Sign in to follow this  
Code-R

wxWindows help!

Recommended Posts

I'm trying to build a wxwindows app, but i keep getting these unresolved externals errors, though i link with the lib: wx1.obj : error LNK2001: unresolved external symbol "char const * const wxEmptyString" (?wxEmptyString@@3PBDB) wx1.obj : error LNK2019: unresolved external symbol "private: void __thiscall wxString::InitWith(char const *,unsigned int,unsigned int)" (?InitWith@wxString@@AAEXPBDII@Z) referenced in function "public: __thiscall wxString::wxString(char const *,unsigned int)" (??0wxString@@QAE@PBDI@Z) wx1.obj : error LNK2001: unresolved external symbol "char const * const wxStatusLineNameStr" (?wxStatusLineNameStr@@3PBDB) wx1.obj : error LNK2001: unresolved external symbol "char const * const wxFrameNameStr" (?wxFrameNameStr@@3PBDB) wxmswu.lib(app.obj) : error LNK2019: unresolved external symbol __imp__InitCommonControls@0 referenced in function "public: static bool __cdecl wxApp::Initialize(void)" (?Initialize@wxApp@@SA_NXZ) wxmswu.lib(statbr95.obj) : error LNK2019: unresolved external symbol __imp__CreateStatusWindowW@16 referenced in function "public: bool __thiscall wxStatusBar::Create(class wxWindow *,int,long,class wxString const &)" (?Create@wxStatusBar@@QAE_NPAVwxWindow@@HJABVwxString@@@Z) wxmswu.lib(utils.obj) : error LNK2019: unresolved external symbol _WSACleanup@0 referenced in function "bool __cdecl wxGetFullHostName(unsigned short *,int)" (?wxGetFullHostName@@YA_NPAGH@Z) wxmswu.lib(utils.obj) : error LNK2019: unresolved external symbol _gethostbyaddr@12 referenced in function "bool __cdecl wxGetFullHostName(unsigned short *,int)" (?wxGetFullHostName@@YA_NPAGH@Z) wxmswu.lib(utils.obj) : error LNK2019: unresolved external symbol _gethostbyname@4 referenced in function "bool __cdecl wxGetFullHostName(unsigned short *,int)" (?wxGetFullHostName@@YA_NPAGH@Z) wxmswu.lib(utils.obj) : error LNK2019: unresolved external symbol _gethostname@8 referenced in function "bool __cdecl wxGetFullHostName(unsigned short *,int)" (?wxGetFullHostName@@YA_NPAGH@Z) wxmswu.lib(utils.obj) : error LNK2019: unresolved external symbol _WSAStartup@8 referenced in function "bool __cdecl wxGetFullHostName(unsigned short *,int)" (?wxGetFullHostName@@YA_NPAGH@Z) wxmswu.lib(spinbutt.obj) : error LNK2019: unresolved external symbol __imp__CreateUpDownControl@48 referenced in function "public: bool __thiscall wxSpinButton::Create(class wxWindow *,int,class wxPoint const &,class wxSize const &,long,class wxString const &)" (?Create@wxSpinButton@@QAE_NPAVwxWindow@@HABVwxPoint@@ABVwxSize@@JABVwxString@@@Z) wxmswu.lib(imaglist.obj) : error LNK2019: unresolved external symbol __imp__ImageList_GetImageCount@4 referenced in function "public: int __thiscall wxImageList::GetImageCount(void)const " (?GetImageCount@wxImageList@@QBEHXZ) wxmswu.lib(imaglist.obj) : error LNK2019: unresolved external symbol __imp__ImageList_GetIconSize@12 referenced in function "public: bool __thiscall wxImageList::GetSize(int,int &,int &)const " (?GetSize@wxImageList@@QBE_NHAAH0@Z) wxmswu.lib(imaglist.obj) : error LNK2019: unresolved external symbol __imp__ImageList_Create@20 referenced in function "public: bool __thiscall wxImageList::Create(int,int,bool,int)" (?Create@wxImageList@@QAE_NHH_NH@Z) wxmswu.lib(imaglist.obj) : error LNK2019: unresolved external symbol __imp__ImageList_Destroy@4 referenced in function "public: virtual __thiscall wxImageList::~wxImageList(void)" (??1wxImageList@@UAE@XZ) wxmswu.lib(imaglist.obj) : error LNK2019: unresolved external symbol __imp__ImageList_AddMasked@12 referenced in function "public: int __thiscall wxImageList::Add(class wxBitmap const &,class wxColour const &)" (?Add@wxImageList@@QAEHABVwxBitmap@@ABVwxColour@@@Z) wxmswu.lib(imaglist.obj) : error LNK2019: unresolved external symbol __imp__ImageList_ReplaceIcon@12 referenced in function "public: int __thiscall wxImageList::Add(class wxIcon const &)" (?Add@wxImageList@@QAEHABVwxIcon@@@Z) wxmswu.lib(imaglist.obj) : error LNK2019: unresolved external symbol __imp__ImageList_Remove@8 referenced in function "public: bool __thiscall wxImageList::Remove(int)" (?Remove@wxImageList@@QAE_NH@Z) wxmswu.lib(imaglist.obj) : error LNK2019: unresolved external symbol __imp__ImageList_Draw@24 referenced in function "public: bool __thiscall wxImageList::Draw(int,class wxDC &,int,int,int,bool)" (?Draw@wxImageList@@QAE_NHAAVwxDC@@HHH_N@Z) wxmswu.lib(imaglist.obj) : error LNK2019: unresolved external symbol __imp__ImageList_SetBkColor@8 referenced in function "public: bool __thiscall wxImageList::Draw(int,class wxDC &,int,int,int,bool)" (?Draw@wxImageList@@QAE_NHAAVwxDC@@HHH_N@Z) wxmswu.lib(imaglist.obj) : error LNK2019: unresolved external symbol __imp__ImageList_Add@12 referenced in function "public: int __thiscall wxImageList::Add(class wxBitmap const &,class wxBitmap const &)" (?Add@wxImageList@@QAEHABVwxBitmap@@0@Z) wxmswu.lib(imaglist.obj) : error LNK2019: unresolved external symbol __imp__ImageList_Replace@16 referenced in function "public: bool __thiscall wxImageList::Replace(int,class wxBitmap const &,class wxBitmap const &)" (?Replace@wxImageList@@QAE_NHABVwxBitmap@@0@Z) Release/wx1.exe : fatal error LNK1120: 23 unresolved externals Build log was saved at "file://c:\wx1\wx1\Release\BuildLog.htm" wx1 - 24 error(s), 8 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== any ideas?

Share this post


Link to post
Share on other sites
now it's down to those:

wx1.obj : error LNK2001: unresolved external symbol "char const * const wxEmptyString" (?wxEmptyString@@3PBDB)
wx1.obj : error LNK2019: unresolved external symbol "private: void __thiscall wxString::InitWith(char const *,unsigned int,unsigned int)" (?InitWith@wxString@@AAEXPBDII@Z) referenced in function "public: __thiscall wxString::wxString(char const *,unsigned int)" (??0wxString@@QAE@PBDI@Z)
wx1.obj : error LNK2001: unresolved external symbol "char const * const wxStatusLineNameStr" (?wxStatusLineNameStr@@3PBDB)
wx1.obj : error LNK2001: unresolved external symbol "char const * const wxFrameNameStr" (?wxFrameNameStr@@3PBDB)

???

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
what's your build environment? how are you linking in wxWindows? what changed between your first and second post?

Share this post


Link to post
Share on other sites
on linux when i compile wxwindows programs, i have to use

g++ wxwindowsprogram.cpp -o wxwindowsbinary `wx-config --cflags --libs`

the
`wx-config --cflags --libs`
is bassically passing the output of that command to where i type it (note the `). So if you look and find wx-config somewhere on your system, trying typing that.

BTW: I do know that if you use dev-cpp on windows, when you install wx-windows it should have an option in the menu to create a wxwindows program.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this