GAH!! What the freaking crap is up with my linker

Started by
4 comments, last by zyklus 18 years, 8 months ago
I am an advanced C++ user... but i cant seem to figure this one out, ive never seen it before Ever since i installed the psdk (at least i think) i cant compile anything This is one of my mfc projects In debug mode: stdafx.obj : error LNK2001: unresolved external symbol @_RTC_CheckStackVars@8 stdafx.obj : error LNK2019: unresolved external symbol __imp___resetstkoflw referenced in function "bool __cdecl ATL::_ATL_SAFE_ALLOCA_IMPL::_AtlVerifyStackAvailable(unsigned long)" (?_AtlVerifyStackAvailable@_ATL_SAFE_ALLOCA_IMPL@ATL@@YA_NK@Z) mfcs71d.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp___resetstkoflw atlsd.lib(AtlTraceModuleManager.obj) : error LNK2001: unresolved external symbol ___security_cookie atlsd.lib(AtlDebugAPI.obj) : error LNK2001: unresolved external symbol ___security_cookie atlsd.lib(atlfuncs.obj) : error LNK2001: unresolved external symbol ___security_cookie atlsd.lib(atlbase.obj) : error LNK2001: unresolved external symbol ___security_cookie atlsd.lib(Allocate.obj) : error LNK2001: unresolved external symbol ___security_cookie mfcs71d.lib(stdafx.obj) : error LNK2019: unresolved external symbol ___security_cookie referenced in function "unsigned int __stdcall ATL::_AtlGetThreadACPThunk(void)" (?_AtlGetThreadACPThunk@ATL@@YGIXZ) atlsd.lib(atltypes.obj) : error LNK2001: unresolved external symbol ___security_cookie atlsd.lib(atltrace.obj) : error LNK2001: unresolved external symbol ___security_cookie atlsd.lib(Externs.obj) : error LNK2001: unresolved external symbol ___security_cookie atlsd.lib(AtlTraceModuleManager.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 atlsd.lib(AtlDebugAPI.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 atlsd.lib(atlfuncs.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 atlsd.lib(atlbase.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 atlsd.lib(Allocate.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 mfcs71d.lib(stdafx.obj) : error LNK2019: unresolved external symbol @__security_check_cookie@4 referenced in function "unsigned int __stdcall ATL::_AtlGetThreadACPThunk(void)" (?_AtlGetThreadACPThunk@ATL@@YGIXZ) atlsd.lib(atltypes.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 atlsd.lib(atltrace.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 atlsd.lib(Externs.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 Or in release mode: stdafx.obj : error LNK2001: unresolved external symbol ___security_cookie mfcs71.lib(stdafx.obj) : error LNK2001: unresolved external symbol ___security_cookie atls.lib(atlbase.obj) : error LNK2001: unresolved external symbol ___security_cookie PassEncryptDlg.obj : error LNK2019: unresolved external symbol @__security_check_cookie@4 referenced in function "unsigned int __stdcall ATL::_AtlGetThreadACPFake(void)" (?_AtlGetThreadACPFake@ATL@@YGIXZ) stdafx.obj : error LNK2001: unresolved external symbol @__security_check_cookie@4 mfcs71.lib(stdafx.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 atls.lib(atlbase.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4 stdafx.obj : error LNK2019: unresolved external symbol __imp___resetstkoflw referenced in function "bool __cdecl ATL::_ATL_SAFE_ALLOCA_IMPL::_AtlVerifyStackAvailable(unsigned long)" (?_AtlVerifyStackAvailable@_ATL_SAFE_ALLOCA_IMPL@ATL@@YA_NK@Z) mfcs71.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp___resetstkoflw mfcs71.lib(stdafx.obj) : error LNK2019: unresolved external symbol __SEH_epilog referenced in function "bool __cdecl ATL::_ATL_SAFE_ALLOCA_IMPL::_AtlVerifyStackAvailable(unsigned long)" (?_AtlVerifyStackAvailable@_ATL_SAFE_ALLOCA_IMPL@ATL@@YA_NK@Z) atls.lib(atlbase.obj) : error LNK2001: unresolved external symbol __SEH_epilog mfcs71.lib(stdafx.obj) : error LNK2019: unresolved external symbol __SEH_prolog referenced in function "bool __cdecl ATL::_ATL_SAFE_ALLOCA_IMPL::_AtlVerifyStackAvailable(unsigned long)" (?_AtlVerifyStackAvailable@_ATL_SAFE_ALLOCA_IMPL@ATL@@YA_NK@Z) atls.lib(atlbase.obj) : error LNK2001: unresolved external symbol __SEH_prolog I can get my console programs to work fine by removing the $(VCInstallDir)PlatformSDK\ incl and lib directories but when i try to remove the dirs in mfc, it can't link I think i need to update some somethings, but i dont know where to download the updates It might have to do something with regestry settings because on an other user, my same projects compile fine... but i dont know where to look for in the regestry can anybody help? :| Danke schörn
Advertisement
If I had to guess, it looks like you are trying to compile against a version of the Platform SDK that doesn't support MSVC 6 against MSVC 6. Of course, I wasn't aware that any such version of the Platform SDK existed, but that's what those errors look like.
Maybe u cud try putting this at the top of ur code:
#pragma comment (lib, "atlsd.lib")

Maybe it won't help.
Thanks for the help but...

SiCrane: I use visual studio net. i dont know if that has anything to do with this
ballybeg: I tried compiling it again with that lib, and I still get the same linker errors
http://students.cs.tamu.edu/jwf4661/441/dx/
thanks petewood, that link really helped even though i'm not using dx right now (but plan to in the future). The link made me look through the lib dir harder... and found that the problem was that i had included the vs98 lib dir (sicrane was right). When i first tried, the buffer security check did not help anything. But when i removed the vc98 lib dir, it worked fine.

Thanks for all ur help :)

This topic is closed to new replies.

Advertisement