none
Link Error - SysFreeString, SysStringLen, ATL RRS feed

  • Question

  • Hi,

    I did the following:

    1. Installed Visual Studio 2008 + SP1
    2. Installed Platform Builder WEC 7 and all updates (up to today, including february 2012)
    3. Generated WEC 7 with "Build and Sysgen"
    4. Generated an SDK with the following "additional path" : C:\WINCE700\public\COMMON\oak\inc; C:\WINCE700\public\dcom\oak\lib\x86\retail
    5. Installed the SDK on another machine
    6. Installed Windows Embedded Compact 7 ATL Update for Visual Studio 2008 SP1 on the same machine I installed the SDK on.
    7. Compiled my project on this same machine with the SDK

    And then I get this link error... I just don't know where to look at to fix that problem...

    How can I fix this error?

    1>SmfApp.obj : error LNK2019: unresolved external symbol __imp__SysStringLen referenced in function "public: unsigned int __thiscall ATL::CComBSTR::Length(void)const " (?Length@CComBSTR@ATL@@QBEIXZ)
    1>SmfApp.obj : error LNK2019: unresolved external symbol __imp__SysFreeString referenced in function "public: __thiscall ATL::CComBSTR::~CComBSTR(void)" (??1CComBSTR@ATL@@QAE@XZ)
    1>StdAfx.obj : error LNK2001: unresolved external symbol __imp__SysFreeString
    1>TcpCommCompSslLib.lib(ssl.obj) : error LNK2001: unresolved external symbol __imp__SysFreeString
    1>atls.lib(stdafx.obj) : error LNK2001: unresolved external symbol __imp__SysFreeString
    1>SmfApp.obj : error LNK2019: unresolved external symbol __imp__SysAllocString referenced in function "long __cdecl ATL::AtlLoadTypeLib(struct HINSTANCE__ *,wchar_t const *,wchar_t * *,struct ITypeLib * *)" (?AtlLoadTypeLib@ATL@@YAJPAUHINSTANCE__@@PB_WPAPA_WPAPAUITypeLib@@@Z)
    1>SmfApp.obj : error LNK2019: unresolved external symbol __imp__LoadTypeLib referenced in function "long __cdecl ATL::AtlLoadTypeLib(struct HINSTANCE__ *,wchar_t const *,wchar_t * *,struct ITypeLib * *)" (?AtlLoadTypeLib@ATL@@YAJPAUHINSTANCE__@@PB_WPAPA_WPAPAUITypeLib@@@Z)
    1>SmfApp.obj : error LNK2001: unresolved external symbol _CLSID_StdGlobalInterfaceTable
    1>SmfApp.obj : error LNK2019: unresolved external symbol __imp__RegisterTypeLib referenced in function "long __cdecl ATL::AtlRegisterTypeLib(struct HINSTANCE__ *,wchar_t const *)" (?AtlRegisterTypeLib@ATL@@YAJPAUHINSTANCE__@@PB_W@Z)
    1>SmfApp.obj : error LNK2019: unresolved external symbol __imp__VarUI4FromStr referenced in function __catch$?AddValue@CRegParser@ATL@@IAEJAAVCRegKey@2@PB_WPA_W@Z$0
    1>SmfApp.obj : error LNK2001: unresolved external symbol _IID_IMarshal
    1>atls.lib(atlbase.obj) : error LNK2001: unresolved external symbol _IID_IPersistStream
    1>..\Bin\CE7\X86\VC9\Release/SmfApp.exe : fatal error LNK1120: 9 unresolved externals

    Tuesday, March 20, 2012 3:07 PM

All replies

  • Oh I forgot.

    Between steps 6 and 7, I added the followings to VC++ directories:

    Includes:

    • $(VCInstallDir)ce7\include
    • $(VCInstallDir)ce7\atlmfc\include

    Libraries:

    • $(VCInstallDir)ce7\lib\x86
    • $(VCInstallDir)ce7\atlmfc\lib\x86

    Source:

    • $(VCInstallDir)ce7\atlmfc\src\atl\atls

    Old paths not specifying ce7 are still there ($(VCInstallDir)ce\include and others)

    Tuesday, March 20, 2012 3:10 PM