User forums > Help

Linker Errors

(1/4) > >>

mspoerr:
Hello,

I am fighting now since three days with CB and wxWidgets. I am new to both of them, but before I start with the problem, here is my environment:
WinXP; Code::Blocks Build 4545; MS Visual Studio 2005 (I want to switch to Code::Blocks but use the VS compiler); wxWidgets 2.8.6 (wxPack for VS)

--

Problem: I start a new wxWidgets project with the wizard and add some controls with wxSmith. After that I build the project and get lots of LNK2001 linker errors. Which libs do I need? Are there any needed settings, the wizard does not set?

Thanks,
/mspoerr


testApp.obj:: error LNK2001: unresolved external symbol "public: virtual bool __thiscall wxApp::Initialize(int &,wchar_t * *)" (?Initialize@wxApp@@UAE_NAAHPAPA_W@Z)
testMain.obj:: error LNK2019: unresolved external symbol "wchar_t const * const wxEmptyString" (?wxEmptyString@@3PB_WB) referenced in function "protected: void __thiscall wxStringBase::Init(void)" (?Init@wxStringBase@@IAEXXZ)
testMain.obj:: error LNK2019: unresolved external symbol "protected: bool __thiscall wxStringBase::ConcatSelf(unsigned int,wchar_t const *,unsigned int)" (?ConcatSelf@wxStringBase@@IAE_NIPB_WI@Z) referenced in function "protected: bool __thiscall wxStringBase::ConcatSelf(unsigned int,wchar_t const *)" (?ConcatSelf@wxStringBase@@IAE_NIPB_W@Z)
testMain.obj:: error LNK2019: unresolved external symbol "protected: void __thiscall wxStringBase::InitWith(wchar_t const *,unsigned int,unsigned int)" (?InitWith@wxStringBase@@IAEXPB_WII@Z) referenced in function "public: __thiscall wxStringBase::wxStringBase(wchar_t const *)" (??0wxStringBase@@QAE@PB_W@Z)
wxpng.lib(wxpng_pngrutil.obj):: error LNK2019: unresolved external symbol __iob referenced in function _png_handle_pCAL
wxjpeg.lib(wxjpeg_jerror.obj):: error LNK2001: unresolved external symbol __iob
wxmsw28u.lib(monolib_log.obj):: error LNK2001: unresolved external symbol __iob
wxmsw28u.lib(monolib_msgout.obj):: error LNK2001: unresolved external symbol __iob
wxpng.lib(wxpng_pngerror.obj):: error LNK2001: unresolved external symbol __iob
wxpng.lib(wxpng_pngwutil.obj):: error LNK2001: unresolved external symbol __iob
wxmsw28u.lib(monolib_stopwatch.obj):: error LNK2019: unresolved external symbol _ftime referenced in function "class wxLongLongNative __cdecl wxGetLocalTimeMillis(void)" (?wxGetLocalTimeMillis@@YA?AVwxLongLongNative@@XZ)
wxmsw28u.lib(monolib_datetime.obj):: error LNK2019: unresolved external symbol _timezone referenced in function "int __cdecl GetTimeZone(void)" (?GetTimeZone@@YAHXZ)
wxmsw28u.lib(monolib_strconv.obj):: error LNK2019: unresolved external symbol _strdup referenced in function "public: __thiscall wxCharBuffer::wxCharBuffer(char const *)" (??0wxCharBuffer@@QAE@PBD@Z)
wxmsw28u.lib(monolib_xpmdecod.obj):: error LNK2001: unresolved external symbol _strdup
wxmsw28u.lib(monolib_textfile.obj):: error LNK2001: unresolved external symbol _strdup
bin\Release\test.exe:: fatal error LNK1120: 8 unresolved externals
:: === Build finished: 16 errors, 0 warnings ===

TDragon:
Enable full command-line logging in your global compiler settings and post the build log.

mspoerr:
Hi TDragon,

thank you for your answer.

LOG:
 

--- Code: ----------------- Build: Release in test ---------------
link.exe /nologo /subsystem:windows /LIBPATH:D:\wxWidgets2.8\lib\vc_lib /LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\lib" /LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Lib" /LIBPATH:D:\wxWidgets2.8 /LIBPATH:D:\wxWidgets2.8\lib\vc_dll /LIBPATH:D:\wxWidgets2.8\lib\vc_lib  /out:bin\Release\test.exe msvcrt.lib wxmsw28u.lib wxpng.lib wxjpeg.lib wxtiff.lib wxzlib.lib winmm.lib rpcrt4.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib wsock32.lib odbc32.lib  obj\Release\testApp.obj obj\Release\testMain.obj  obj\Release\resource.res  /NODEFAULTLIB /INCREMENTAL:NO /SUBSYSTEM:WINDOWS
testApp.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall wxApp::Initialize(int &,wchar_t * *)" (?Initialize@wxApp@@UAE_NAAHPAPA_W@Z)
testMain.obj : error LNK2019: unresolved external symbol "wchar_t const * const wxEmptyString" (?wxEmptyString@@3PB_WB) referenced in function "protected: void __thiscall wxStringBase::Init(void)" (?Init@wxStringBase@@IAEXXZ)
testMain.obj : error LNK2019: unresolved external symbol "protected: bool __thiscall wxStringBase::ConcatSelf(unsigned int,wchar_t const *,unsigned int)" (?ConcatSelf@wxStringBase@@IAE_NIPB_WI@Z) referenced in function "protected: bool __thiscall wxStringBase::ConcatSelf(unsigned int,wchar_t const *)" (?ConcatSelf@wxStringBase@@IAE_NIPB_W@Z)
testMain.obj : error LNK2019: unresolved external symbol "protected: void __thiscall wxStringBase::InitWith(wchar_t const *,unsigned int,unsigned int)" (?InitWith@wxStringBase@@IAEXPB_WII@Z) referenced in function "public: __thiscall wxStringBase::wxStringBase(wchar_t const *)" (??0wxStringBase@@QAE@PB_W@Z)
wxpng.lib(wxpng_pngrutil.obj) : error LNK2019: unresolved external symbol __iob referenced in function _png_handle_pCAL
wxjpeg.lib(wxjpeg_jerror.obj) : error LNK2001: unresolved external symbol __iob
wxmsw28u.lib(monolib_log.obj) : error LNK2001: unresolved external symbol __iob
wxmsw28u.lib(monolib_msgout.obj) : error LNK2001: unresolved external symbol __iob
wxpng.lib(wxpng_pngerror.obj) : error LNK2001: unresolved external symbol __iob
wxpng.lib(wxpng_pngwutil.obj) : error LNK2001: unresolved external symbol __iob
wxmsw28u.lib(monolib_stopwatch.obj) : error LNK2019: unresolved external symbol _ftime referenced in function "class wxLongLongNative __cdecl wxGetLocalTimeMillis(void)" (?wxGetLocalTimeMillis@@YA?AVwxLongLongNative@@XZ)
wxmsw28u.lib(monolib_datetime.obj) : error LNK2019: unresolved external symbol _timezone referenced in function "int __cdecl GetTimeZone(void)" (?GetTimeZone@@YAHXZ)
wxmsw28u.lib(monolib_strconv.obj) : error LNK2019: unresolved external symbol _strdup referenced in function "public: __thiscall wxCharBuffer::wxCharBuffer(char const *)" (??0wxCharBuffer@@QAE@PBD@Z)
wxmsw28u.lib(monolib_xpmdecod.obj) : error LNK2001: unresolved external symbol _strdup
wxmsw28u.lib(monolib_textfile.obj) : error LNK2001: unresolved external symbol _strdup
bin\Release\test.exe : fatal error LNK1120: 8 unresolved externals
Process terminated with status 1120 (0 minutes, 5 seconds)
16 errors, 0 warnings
 

--- End code ---

mspoerr:
Hello again,

any ideas for this problem?

Thanks,
/mspoerr

TDragon:
I recently deleted my MSVC build of wxWidgets, so I'm rebuilding it. In the meantime, you might try choosing a DLL configuration (check the "Use wxWidgets DLL" box in the wizard) as opposed to a static and see if that works.

Navigation

[0] Message Index

[#] Next page

Go to full version