User forums > Help
Linker Errors
mspoerr:
Hi TDragon,
it's nearly the same - see log for details. How can I find out, which libs are missing?
/mspoerr
--- Quote ---:: === test, Debug ===
testApp.obj:: error LNK2001: unresolved external symbol "public: virtual bool __thiscall wxApp::Initialize(int &,wchar_t * *)" (?Initialize@wxApp@@UAE_NAAHPAPA_W@Z)
testApp.obj:: error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssertFailure(wchar_t const *,int,wchar_t const *,wchar_t const *,wchar_t const *)" (?OnAssertFailure@wxAppConsole@@UAEXPB_WH000@Z)
testApp.obj:: error LNK2001: unresolved external symbol "public: virtual void __thiscall wxAppConsole::OnAssert(wchar_t const *,int,wchar_t const *,wchar_t const *)" (?OnAssert@wxAppConsole@@UAEXPB_WH00@Z)
testMain.obj:: error LNK2019: unresolved external symbol "__declspec(dllimport) public: class wxString & __thiscall wxString::operator<<(wchar_t const *)" (__imp_??6wxString@@QAEAAV0@PB_W@Z) referenced in function "class wxString __cdecl wxbuildinfo(enum wxbuildinfoformat)" (?wxbuildinfo@@YA?AVwxString@@W4wxbuildinfoformat@@@Z)
testMain.obj:: error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::wxString(wchar_t const *)" (__imp_??0wxString@@QAE@PB_W@Z) referenced in function "class wxString __cdecl wxbuildinfo(enum wxbuildinfoformat)" (?wxbuildinfo@@YA?AVwxString@@W4wxbuildinfoformat@@@Z)
testMain.obj:: error LNK2001: unresolved external symbol "__declspec(dllimport) wchar_t const * const wxEmptyString" (__imp_?wxEmptyString@@3PB_WB)
bin\Debug\test.exe:: fatal error LNK1120: 6 unresolved externals
:: === Build finished: 7 errors, 0 warnings ===
--- End quote ---
TDragon:
All right, now I see what I missed earlier. You can see what's happening in the link.exe command line from the build log:
--- Code: ---link.exe [...] /LIBPATH:D:\wxWidgets2.8\lib\vc_lib [...] /LIBPATH:D:\wxWidgets2.8 /LIBPATH:D:\wxWidgets2.8\lib\vc_dll /LIBPATH:D:\wxWidgets2.8\lib\vc_lib [...]
--- End code ---
You've got library search directories for both the static version (vc_lib) and the DLL version (vc_dll) in your search path, so the compiler is picking the wrong wxmsw28u.lib to go with your configuration. Re-run the wxWidgets project wizard and don't add any extraneous search paths. If that's not an option, remove any inappropriate paths. Also, make sure that no wxWidgets paths are in your global (not project specific) compiler settings.
mspoerr:
I now started a new project with debug and relase output, wxwidgets in a static lib and no unicode support. I deleted all wx paths at the global settings and checked the paths in the project settings and they seem to be ok, but the nothing changed at all. The log is slightly different because of the changed settings in the wizard. Attached is the new error log.
/mspoerr
--- Quote ----------------- Build: Debug in test1 ---------------
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" /out:bin\Debug\test1.exe msvcrtd.lib wxmsw28d.lib wxpngd.lib wxjpegd.lib wxtiffd.lib wxzlibd.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\Debug\test1App.obj obj\Debug\test1Main.obj obj\Debug\resource.res /DEBUG /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:msvcrt.lib /INCREMENTAL:NO /SUBSYSTEM:WINDOWS
wxpngd.lib(wxpng_pngwutil.obj) : error LNK2001: unresolved external symbol __iob
wxjpegd.lib(wxjpeg_jerror.obj) : error LNK2001: unresolved external symbol __iob
wxmsw28d.lib(monolib_log.obj) : error LNK2001: unresolved external symbol __iob
wxmsw28d.lib(monolib_msgout.obj) : error LNK2001: unresolved external symbol __iob
wxpngd.lib(wxpng_pngerror.obj) : error LNK2001: unresolved external symbol __iob
wxpngd.lib(wxpng_pngrutil.obj) : error LNK2001: unresolved external symbol __iob
wxmsw28d.lib(monolib_datetime.obj) : error LNK2001: unresolved external symbol _timezone
OLDNAMES.lib(timezone.obj) : error LNK2001: unresolved external symbol _timezone
OLDNAMES.lib(timezone.obj) : error LNK2001: unresolved external symbol __timezone
bin\Debug\test1.exe : fatal error LNK1120: 3 unresolved externals
Process terminated with status 1120 (0 minutes, 0 seconds)
10 errors, 0 warnings
--- End quote ---
TDragon:
I can't reproduce your error with an identical link command-line, so I wonder if doing a full rebuild (Ctrl+F11) will solve the problem?
stahta01:
Does wxPack have msvc 8.0 built binaries?
The web site mentions 7.1 not 8.0.
I have never been able to mix wxWidgets built with MSVC 7.1 (2003) with client code assembled with MSVC 8.0 (2005). I think it should be possible, but I have never found the way to do it.
Tim S
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version