1. robertmills's Avatar
    Hi, I am trying to play around with the USBSample that is provided when you download the JDE. I see that the initial project was built for VC++ 6. Upon opening in VS 2008 and trying to compile (after it does project conversion) I get a plethora of link errors. Any ideas what I need to do to get this project to compile correctly? Thanks in advance!

    Code:
    USBClient.obj : error LNK2019: unresolved external symbol ___security_cookie referenced in function _main
    sha.lib(Sha.obj) : error LNK2001: unresolved external symbol ___security_cookie
    comsuppwd.lib(comutil.obj) : error LNK2001: unresolved external symbol ___security_cookie
    comsuppwd.lib(invkprxy.obj) : error LNK2001: unresolved external symbol ___security_cookie
    USBClient.obj : error LNK2019: unresolved external symbol ___CxxFrameHandler3 referenced in function __ehhandler$_main
    comsuppwd.lib(comutil.obj) : error LNK2001: unresolved external symbol ___CxxFrameHandler3
    USBClient.obj : error LNK2019: unresolved external symbol @__security_check_cookie@4 referenced in function __ehhandler$_main
    sha.lib(Sha.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
    comsuppwd.lib(comutil.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
    comsuppwd.lib(invkprxy.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
    comsuppwd.lib(comraise.obj) : error LNK2001: unresolved external symbol __RTC_CheckEsp
    comsuppwd.lib(invkprxy.obj) : error LNK2001: unresolved external symbol __RTC_CheckEsp
    comsuppwd.lib(invkerr.obj) : error LNK2001: unresolved external symbol __RTC_CheckEsp
    USBClient.obj : error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in function _main
    sha.lib(Sha.obj) : error LNK2001: unresolved external symbol __RTC_CheckEsp
    comsuppwd.lib(comutil.obj) : error LNK2001: unresolved external symbol __RTC_CheckEsp
    comsuppwd.lib(comsupp.obj) : error LNK2001: unresolved external symbol __RTC_CheckEsp
    comsuppwd.lib(invkerr.obj) : error LNK2001: unresolved external symbol @_RTC_CheckStackVars@8
    USBClient.obj : error LNK2019: unresolved external symbol @_RTC_CheckStackVars@8 referenced in function _main
    sha.lib(Sha.obj) : error LNK2001: unresolved external symbol @_RTC_CheckStackVars@8
    comsuppwd.lib(comsupp.obj) : error LNK2001: unresolved external symbol @_RTC_CheckStackVars@8
    comsuppwd.lib(invkprxy.obj) : error LNK2001: unresolved external symbol @_RTC_CheckStackVars@8
    comsuppwd.lib(comraise.obj) : error LNK2001: unresolved external symbol __RTC_Shutdown
    comsuppwd.lib(invkprxy.obj) : error LNK2001: unresolved external symbol __RTC_Shutdown
    comsuppwd.lib(invkerr.obj) : error LNK2001: unresolved external symbol __RTC_Shutdown
    USBClient.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
    sha.lib(Sha.obj) : error LNK2001: unresolved external symbol __RTC_Shutdown
    comsuppwd.lib(comutil.obj) : error LNK2001: unresolved external symbol __RTC_Shutdown
    comsuppwd.lib(comsupp.obj) : error LNK2001: unresolved external symbol __RTC_Shutdown
    comsuppwd.lib(comraise.obj) : error LNK2001: unresolved external symbol __RTC_InitBase
    comsuppwd.lib(invkprxy.obj) : error LNK2001: unresolved external symbol __RTC_InitBase
    comsuppwd.lib(invkerr.obj) : error LNK2001: unresolved external symbol __RTC_InitBase
    USBClient.obj : error LNK2001: unresolved external symbol __RTC_InitBase
    sha.lib(Sha.obj) : error LNK2001: unresolved external symbol __RTC_InitBase
    comsuppwd.lib(comutil.obj) : error LNK2001: unresolved external symbol __RTC_InitBase
    comsuppwd.lib(comsupp.obj) : error LNK2001: unresolved external symbol __RTC_InitBase
    USBClient.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
    comsuppwd.lib(comraise.obj) : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
    USBClient.obj : error LNK2019: unresolved external symbol _strncmp referenced in function "public: int __thiscall USBClient::run(void)" (?run@USBClient@@QAEHXZ)
    USBClient.obj : error LNK2019: unresolved external symbol _strcpy referenced in function "public: int __thiscall USBClient::run(void)" (?run@USBClient@@QAEHXZ)
    USBClient.obj : error LNK2019: unresolved external symbol _strcmp referenced in function "public: int __thiscall USBClient::run(void)" (?run@USBClient@@QAEHXZ)
    USBClient.obj : error LNK2019: unresolved external symbol _printf referenced in function "public: int __thiscall USBClient::run(void)" (?run@USBClient@@QAEHXZ)
    USBClient.obj : error LNK2019: unresolved external symbol _memset referenced in function "public: int __thiscall USBClient::run(void)" (?run@USBClient@@QAEHXZ)
    sha.lib(Sha.obj) : error LNK2001: unresolved external symbol _memset
    comsuppwd.lib(invkprxy.obj) : error LNK2001: unresolved external symbol _memset
    USBClient.obj : error LNK2019: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) referenced in function __unwindfunclet$??4_bstr_t@@QAEAAV0@PB_W@Z$0
    comsuppwd.lib(comutil.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
    comsuppwd.lib(comraise.obj) : error LNK2001: unresolved external symbol "void __cdecl operator delete(void *)" (??3@YAXPAX@Z)
    USBClient.obj : error LNK2019: unresolved external symbol __wassert referenced in function "public: class _bstr_t & __thiscall _bstr_t::operator=(wchar_t const *)" (??4_bstr_t@@QAEAAV0@PB_W@Z)
    USBClient.obj : error LNK2019: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) referenced in function "public: static void * __cdecl _bstr_t::Data_t::operator new(unsigned int)" (??2Data_t@_bstr_t@@SAPAXI@Z)
    comsuppwd.lib(comutil.obj) : error LNK2001: unresolved external symbol "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)
    USBClient.obj : error LNK2019: unresolved external symbol _memcpy_s referenced in function "public: __thiscall _variant_t::_variant_t(struct tagVARIANT &,bool)" (??0_variant_t@@QAE@AAUtagVARIANT@@_N@Z)
    USBClient.obj : error LNK2019: unresolved external symbol _strlen referenced in function "private: bool __thiscall USBClient::Send(char *)" (?Send@USBClient@@AAE_NPAD@Z)
    USBClient.obj : error LNK2019: unresolved external symbol _sprintf_s referenced in function "public: char const * __thiscall _com_error::ErrorMessage(void)const " (?ErrorMessage@_com_error@@QBEPBDXZ)
    USBClient.obj : error LNK2019: unresolved external symbol _memcmp referenced in function _IsEqualGUID
    USBClient.obj : error LNK2019: unresolved external symbol _putch referenced in function "public: virtual long __stdcall USBClient::raw_OnChallenge(long,unsigned char * const)" (?raw_OnChallenge@USBClient@@UAGJJQAE@Z)
    OLDNAMES.lib(putch.obj) : error LNK2001: unresolved external symbol _putch
    USBClient.obj : error LNK2019: unresolved external symbol _getch referenced in function "public: virtual long __stdcall USBClient::raw_OnChallenge(long,unsigned char * const)" (?raw_OnChallenge@USBClient@@UAGJJQAE@Z)
    OLDNAMES.lib(getch.obj) : error LNK2001: unresolved external symbol _getch
    USBClient.obj : error LNK2001: unresolved external symbol __purecall
    LINK : error LNK2001: unresolved external symbol _mainCRTStartup
    sha.lib(Sha.obj) : error LNK2019: unresolved external symbol _memcpy referenced in function _sha_hash
    OLDNAMES.lib(putch.obj) : error LNK2001: unresolved external symbol __putch
    OLDNAMES.lib(getch.obj) : error LNK2001: unresolved external symbol __getch
    comsuppwd.lib(comutil.obj) : error LNK2019: unresolved external symbol _free referenced in function "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z)
    comsuppwd.lib(comutil.obj) : error LNK2019: unresolved external symbol _malloc referenced in function "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z)
    comsuppwd.lib(comutil.obj) : error LNK2019: unresolved external symbol @_RTC_CheckStackVars2@12 referenced in function "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z)
    comsuppwd.lib(invkprxy.obj) : error LNK2001: unresolved external symbol @_RTC_CheckStackVars2@12
    comsuppwd.lib(comutil.obj) : error LNK2019: unresolved external symbol __except_handler4 referenced in function "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z)
    comsuppwd.lib(invkprxy.obj) : error LNK2001: unresolved external symbol __except_handler4
    comsuppwd.lib(comutil.obj) : error LNK2019: unresolved external symbol __alloca_probe_16 referenced in function "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z)
    comsuppwd.lib(invkprxy.obj) : error LNK2001: unresolved external symbol __alloca_probe_16
    comsuppwd.lib(comutil.obj) : error LNK2019: unresolved external symbol @_RTC_AllocaHelper@12 referenced in function "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" (?ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z)
    comsuppwd.lib(invkprxy.obj) : error LNK2001: unresolved external symbol @_RTC_AllocaHelper@12
    comsuppwd.lib(comutil.obj) : error LNK2019: unresolved external symbol _atexit referenced in function "void __cdecl `dynamic initializer for 'vtMissing''(void)" (??__EvtMissing@@YAXXZ)
    comsuppwd.lib(comraise.obj) : error LNK2019: unresolved external symbol __CxxThrowException@8 referenced in function "void __stdcall _com_raise_error(long,struct IErrorInfo *)" (?_com_raise_error@@YGXJPAUIErrorInfo@@@Z)
    comsuppwd.lib(invkprxy.obj) : error LNK2001: unresolved external symbol __fltused
    .\Debug/USBClient.exe : fatal error LNK1120: 36 unresolved externals
    07-04-09 12:01 PM
  2. daveinsurgent's Avatar
    I had the exact same issue.

    The solution was to go in to the project configuration, and it turns out a bunch of libraries were set to be 'excluded' by the conversion wizard. Simply removing everything from the exclusion list allowed me to compile without error.
    07-15-09 08:00 PM
  3. gerdijo's Avatar
    daveinsurgent

    I appologize but I was hoping you could give me some further details on what I need to do in order to get this to work in Visual Studio 2008. Any help that you can give me would be greatly appreciated.
    10-26-09 03:16 PM
LINK TO POST COPIED TO CLIPBOARD