errors building wxWidgets in VS2008 Topic is solved
errors building wxWidgets in VS2008
hello, I usually develop in linux so this is an area in which I don't have much breadth of knowledge. I've been following the steps outlined in the wiki (here: http://wiki.wxwidgets.org/Microsoft_Vis ... B%2B_Guide) and I'm running into problems in section 3. I tried to just do the "batch build all" but that gave me about 100 errors of various sorts, so I've been doing the manual build of the individual components and that went well up to building "odbc" where I got 8 errors:
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall wxVariant::operator=(struct tagTIMESTAMP_STRUCT const *)" (__imp_??4wxVariant@@QAEXPBUtagTIMESTAMP_STRUCT@@@Z) referenced in function "public: virtual class wxVariant __thiscall wxDbTable::GetColumn(int)const " (?GetColumn@wxDbTable@@UBE?AVwxVariant@@H@Z) dbtable.obj odbc
Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall wxVariant::operator=(struct tagTIME_STRUCT const *)" (__imp_??4wxVariant@@QAEXPBUtagTIME_STRUCT@@@Z) referenced in function "public: virtual class wxVariant __thiscall wxDbTable::GetColumn(int)const " (?GetColumn@wxDbTable@@UBE?AVwxVariant@@H@Z) dbtable.obj odbc
Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall wxVariant::operator=(struct tagDATE_STRUCT const *)" (__imp_??4wxVariant@@QAEXPBUtagDATE_STRUCT@@@Z) referenced in function "public: virtual class wxVariant __thiscall wxDbTable::GetColumn(int)const " (?GetColumn@wxDbTable@@UBE?AVwxVariant@@H@Z) dbtable.obj odbc
Error 4 fatal error LNK1120: 3 unresolved externals ..\..\lib\vc_dll\wxbase28_odbc_vc_custom.dll odbc
Error 5 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall wxVariant::operator=(struct tagTIMESTAMP_STRUCT const *)" (__imp_??4wxVariant@@QAEXPBUtagTIMESTAMP_STRUCT@@@Z) referenced in function "public: virtual class wxVariant __thiscall wxDbTable::GetColumn(int)const " (?GetColumn@wxDbTable@@UBE?AVwxVariant@@H@Z) dbtable.obj odbc
Error 6 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall wxVariant::operator=(struct tagTIME_STRUCT const *)" (__imp_??4wxVariant@@QAEXPBUtagTIME_STRUCT@@@Z) referenced in function "public: virtual class wxVariant __thiscall wxDbTable::GetColumn(int)const " (?GetColumn@wxDbTable@@UBE?AVwxVariant@@H@Z) dbtable.obj odbc
Error 7 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall wxVariant::operator=(struct tagDATE_STRUCT const *)" (__imp_??4wxVariant@@QAEXPBUtagDATE_STRUCT@@@Z) referenced in function "public: virtual class wxVariant __thiscall wxDbTable::GetColumn(int)const " (?GetColumn@wxDbTable@@UBE?AVwxVariant@@H@Z) dbtable.obj odbc
Error 8 fatal error LNK1120: 3 unresolved externals ..\..\lib\vc_dll\wxbase28u_odbc_vc_custom.dll odbc
WxWidgets version: 2.8.9
I did a google search trying to find a solution, but I didn't find any vs2008 LNK1120 errors relating to wxwidgets.
I am working just in the "wx" project that results from loading the wx.proj file from inside the wxwidgets program files so many of the linker options etc, are not available to me. It seemed from the wiki that I would need to build wxwidgets before I could use it in a project, but maybe that was an incorrect assumption.
Let me know if any other information would be relevant to include, any help would be appreciated.
Thanks!
~J
Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall wxVariant::operator=(struct tagTIMESTAMP_STRUCT const *)" (__imp_??4wxVariant@@QAEXPBUtagTIMESTAMP_STRUCT@@@Z) referenced in function "public: virtual class wxVariant __thiscall wxDbTable::GetColumn(int)const " (?GetColumn@wxDbTable@@UBE?AVwxVariant@@H@Z) dbtable.obj odbc
Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall wxVariant::operator=(struct tagTIME_STRUCT const *)" (__imp_??4wxVariant@@QAEXPBUtagTIME_STRUCT@@@Z) referenced in function "public: virtual class wxVariant __thiscall wxDbTable::GetColumn(int)const " (?GetColumn@wxDbTable@@UBE?AVwxVariant@@H@Z) dbtable.obj odbc
Error 3 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall wxVariant::operator=(struct tagDATE_STRUCT const *)" (__imp_??4wxVariant@@QAEXPBUtagDATE_STRUCT@@@Z) referenced in function "public: virtual class wxVariant __thiscall wxDbTable::GetColumn(int)const " (?GetColumn@wxDbTable@@UBE?AVwxVariant@@H@Z) dbtable.obj odbc
Error 4 fatal error LNK1120: 3 unresolved externals ..\..\lib\vc_dll\wxbase28_odbc_vc_custom.dll odbc
Error 5 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall wxVariant::operator=(struct tagTIMESTAMP_STRUCT const *)" (__imp_??4wxVariant@@QAEXPBUtagTIMESTAMP_STRUCT@@@Z) referenced in function "public: virtual class wxVariant __thiscall wxDbTable::GetColumn(int)const " (?GetColumn@wxDbTable@@UBE?AVwxVariant@@H@Z) dbtable.obj odbc
Error 6 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall wxVariant::operator=(struct tagTIME_STRUCT const *)" (__imp_??4wxVariant@@QAEXPBUtagTIME_STRUCT@@@Z) referenced in function "public: virtual class wxVariant __thiscall wxDbTable::GetColumn(int)const " (?GetColumn@wxDbTable@@UBE?AVwxVariant@@H@Z) dbtable.obj odbc
Error 7 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall wxVariant::operator=(struct tagDATE_STRUCT const *)" (__imp_??4wxVariant@@QAEXPBUtagDATE_STRUCT@@@Z) referenced in function "public: virtual class wxVariant __thiscall wxDbTable::GetColumn(int)const " (?GetColumn@wxDbTable@@UBE?AVwxVariant@@H@Z) dbtable.obj odbc
Error 8 fatal error LNK1120: 3 unresolved externals ..\..\lib\vc_dll\wxbase28u_odbc_vc_custom.dll odbc
WxWidgets version: 2.8.9
I did a google search trying to find a solution, but I didn't find any vs2008 LNK1120 errors relating to wxwidgets.
I am working just in the "wx" project that results from loading the wx.proj file from inside the wxwidgets program files so many of the linker options etc, are not available to me. It seemed from the wiki that I would need to build wxwidgets before I could use it in a project, but maybe that was an incorrect assumption.
Let me know if any other information would be relevant to include, any help would be appreciated.
Thanks!
~J
Last edited by jesseb07 on Wed Mar 18, 2009 9:04 pm, edited 3 times in total.
thanks for the reply.
I don't see where I can set build flags inside vs2008, do I need to do this outside of the environment or is there a set of options I am not aware of?
Also, I don't want to assume anything, so I wanted to double check what you meant:
I'm following the build instructions and are building the modules in the following order:
wxjpeg
wxpng
wxtiff
wxzlib
wxregex
wxexpat
base
net
odbc
xml
core
gl
html
media
qa
adv
dbgrid
xrc
aui
richtext
so I assume you are referring to "base" when you said "wxbase" but I wanted to be sure, because otherwise I don't recalling building a module called "wxbase." Thanks.
~J
I don't see where I can set build flags inside vs2008, do I need to do this outside of the environment or is there a set of options I am not aware of?
Also, I don't want to assume anything, so I wanted to double check what you meant:
I'm following the build instructions and are building the modules in the following order:
wxjpeg
wxpng
wxtiff
wxzlib
wxregex
wxexpat
base
net
odbc
xml
core
gl
html
media
qa
adv
dbgrid
xrc
aui
richtext
so I assume you are referring to "base" when you said "wxbase" but I wanted to be sure, because otherwise I don't recalling building a module called "wxbase." Thanks.
~J
I am building them one at a time so I could isolate what was giving me problems, but I skipped "odbc" and continued to see what would happen. There must be an underlying problem somewhere because when I tried to build "core" I got the following errors:
Warning 1 warning C4251: 'wxListMainWindow::m_aColWidths' : class 'ColWidthArray' needs to have dll-interface to be used by clients of class 'wxListMainWindow' c:\wxWidgets-2.8.9\src\generic\listctrl.cpp 778 core
Error 2 error LNK2019: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) referenced in function "public: static int __cdecl wxApp::GetComCtl32Version(void)" (?GetComCtl32Version@wxApp@@SAHXZ) app.obj core
Error 3 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) appcmn.obj core
Error 4 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) msgout.obj core
Error 5 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) rendcmn.obj core
Error 6 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) utilscmn.obj core
Error 7 fatal error LNK1120: 1 unresolved externals ..\..\lib\vc_dll\wxmsw28ud_core_vc_custom.dll core
Warning 8 warning C4251: 'wxListMainWindow::m_aColWidths' : class 'ColWidthArray' needs to have dll-interface to be used by clients of class 'wxListMainWindow' c:\wxWidgets-2.8.9\src\generic\listctrl.cpp 778 core
Error 9 error LNK2019: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) referenced in function "public: static int __cdecl wxApp::GetComCtl32Version(void)" (?GetComCtl32Version@wxApp@@SAHXZ) app.obj core
Error 10 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) appcmn.obj core
Error 11 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) msgout.obj core
Error 12 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) rendcmn.obj core
Error 13 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) utilscmn.obj core
Error 14 fatal error LNK1120: 1 unresolved externals ..\..\lib\vc_dll\wxmsw28d_core_vc_custom.dll core
Warning 15 warning C4251: 'wxListMainWindow::m_aColWidths' : class 'ColWidthArray' needs to have dll-interface to be used by clients of class 'wxListMainWindow' c:\wxWidgets-2.8.9\src\generic\listctrl.cpp 778 core
Warning 16 warning C4251: 'wxListMainWindow::m_aColWidths' : class 'ColWidthArray' needs to have dll-interface to be used by clients of class 'wxListMainWindow' c:\wxWidgets-2.8.9\src\generic\listctrl.cpp 778 core
Since core is necessary (as the name suggests, I think), there seems to be a problem.
~J
Warning 1 warning C4251: 'wxListMainWindow::m_aColWidths' : class 'ColWidthArray' needs to have dll-interface to be used by clients of class 'wxListMainWindow' c:\wxWidgets-2.8.9\src\generic\listctrl.cpp 778 core
Error 2 error LNK2019: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) referenced in function "public: static int __cdecl wxApp::GetComCtl32Version(void)" (?GetComCtl32Version@wxApp@@SAHXZ) app.obj core
Error 3 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) appcmn.obj core
Error 4 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) msgout.obj core
Error 5 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) rendcmn.obj core
Error 6 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) utilscmn.obj core
Error 7 fatal error LNK1120: 1 unresolved externals ..\..\lib\vc_dll\wxmsw28ud_core_vc_custom.dll core
Warning 8 warning C4251: 'wxListMainWindow::m_aColWidths' : class 'ColWidthArray' needs to have dll-interface to be used by clients of class 'wxListMainWindow' c:\wxWidgets-2.8.9\src\generic\listctrl.cpp 778 core
Error 9 error LNK2019: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) referenced in function "public: static int __cdecl wxApp::GetComCtl32Version(void)" (?GetComCtl32Version@wxApp@@SAHXZ) app.obj core
Error 10 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) appcmn.obj core
Error 11 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) msgout.obj core
Error 12 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) rendcmn.obj core
Error 13 error LNK2001: unresolved external symbol "protected: virtual class wxString __thiscall wxAppTraitsBase::GetAssertStackTrace(void)" (?GetAssertStackTrace@wxAppTraitsBase@@MAE?AVwxString@@XZ) utilscmn.obj core
Error 14 fatal error LNK1120: 1 unresolved externals ..\..\lib\vc_dll\wxmsw28d_core_vc_custom.dll core
Warning 15 warning C4251: 'wxListMainWindow::m_aColWidths' : class 'ColWidthArray' needs to have dll-interface to be used by clients of class 'wxListMainWindow' c:\wxWidgets-2.8.9\src\generic\listctrl.cpp 778 core
Warning 16 warning C4251: 'wxListMainWindow::m_aColWidths' : class 'ColWidthArray' needs to have dll-interface to be used by clients of class 'wxListMainWindow' c:\wxWidgets-2.8.9\src\generic\listctrl.cpp 778 core
Since core is necessary (as the name suggests, I think), there seems to be a problem.
~J
well, I fixed the odbc problem by editing the following file:
C:\wxWidgets-2.8.9\include\wx\msw\setup.h
(little bit different path than was suggested, but that happens)
and setting wxUSE_ODBC to 1.
I still had the same errors when building "core" and I couldn't figure that out, something about strings. So I copped out and went with wxPack. It works now
Thanks for all your help.
C:\wxWidgets-2.8.9\include\wx\msw\setup.h
(little bit different path than was suggested, but that happens)
and setting wxUSE_ODBC to 1.
I still had the same errors when building "core" and I couldn't figure that out, something about strings. So I copped out and went with wxPack. It works now
Thanks for all your help.