Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

Hi everyone, I am trying to get to grips with c++ .net and c++ win32, in .net 2003.

 

The problem I have is that when I create an mfc (dialog based) project in .net 2003 and try to run it (I didnt add even a single line of code) then it gives a linker error (below) I have looked all over for a resolution you cannot find one. Can anyone help? please?

 

It seems to relate to "stdafx.h" (stdafx.obj : error LNK2019:) but I cannot work out how to fix it...

 

Error codes

---------------------------------------------------------------------

 

Build Log ------- Build started: Project: mfc_test_02, Configuration: Debug|Win32 -------

 

Command Lines Creating temporary file "c:\Development\Visual Studio Projects\mfc_test_02\mfc_test_02\Debug\RSP000002.rsp" with contents

[

/Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /Zc:wchar_t /Yu"stdafx.h" /Fp"Debug/mfc_test_02.pch" /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /c /Wp64 /ZI /TP

".\mfc_test_02.cpp"

]

Creating command line "cl.exe @"c:\Development\Visual Studio Projects\mfc_test_02\mfc_test_02\Debug\RSP000002.rsp" /nologo"

Creating temporary file "c:\Development\Visual Studio Projects\mfc_test_02\mfc_test_02\Debug\RSP000003.rsp" with contents

[

/OUT:"Debug/mfc_test_02.exe" /INCREMENTAL /NOLOGO /LIBPATH:"/LIBPATH:C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include" /DELAYLOAD:"OleAcc.dll" /DEBUG /PDB:"Debug/mfc_test_02.pdb" /SUBSYSTEM:WINDOWS /MACHINE:X86 DelayImp.lib DelayImp.lib

".\Debug\mfc_test_02.obj"

".\Debug\mfc_test_02Dlg.obj"

".\Debug\stdafx.obj"

".\Debug\mfc_test_02.res"

]

Creating command line "link.exe @"c:\Development\Visual Studio Projects\mfc_test_02\mfc_test_02\Debug\RSP000003.rsp""

Output Window Compiling...

mfc_test_02.cpp

Linking...

stdafx.obj : error LNK2019: unresolved external symbol "unsigned long __cdecl _exception_code(void)" (?_exception_code@@YAKXZ) referenced in function "bool __cdecl ATL::_ATL_SAFE_ALLOCA_IMPL::_AtlVerifyStackAvailable(unsigned long)" (?_AtlVerifyStackAvailable@_ATL_SAFE_ALLOCA_IMPL@ATL@@YA_NK@Z)

Debug/mfc_test_02.exe : fatal error LNK1120: 1 unresolved externals

Results Build log was saved at "file://c:\Development\Visual Studio Projects\mfc_test_02\mfc_test_02\Debug\BuildLog.htm"

mfc_test_02 - 2 error(s), 0 warning(s)

Edited by Rimmel
  • Administrators
Posted
Bump .... :o

 

Perhaps this forum would be better named the "ratheraveragedotnettalk.com" ;)

Just a guess but when you installed VC++ did you install the runtime libraries - and both the ANSI / UNICODE versions.

It could be trying to link to a version you didn't install.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted
Just a guess but when you installed VC++ did you install the runtime libraries - and both the ANSI / UNICODE versions.

It could be trying to link to a version you didn't install.

 

Thanks for the suggestion, I looked at the installed libraries and all the ANSI/UNICODE VERSIONS are installed.

 

Rimmel�

  • *Experts*
Posted

So you get this with a default install and then a new project with no modifications? Maybe give us the exact steps you took to get this error.

 

Also, I wouldn't "bump" a post so soon. It's in bad taste if you haven't waited at least a couple of days and might keep some otherwise helpful users from posting.

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...