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)
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)
Last edited: