Linking errors

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
eewujian
In need of some credit
In need of some credit
Posts: 2
Joined: Tue May 20, 2008 6:08 pm

Linking errors

Post by eewujian » Tue May 20, 2008 6:38 pm

Hi,
I'm a newbie on wxWidgets. I'm trying to compile someone else's code developed using wxWidgets. I downloaded wxWidgets 2.8.7 and built all the libraries successfully. However, when I tried to link the libraries with my project. I got a lot of linking errors. I noticed some wxwidgets functions have been loaded with no problem and I did included all the libraries as additional dependencies. I just could not figure out what caused the problems. My system config is Windows XP and MS Visual Studio 2008. A few error messages I got were listed as follows.

1>panelctrl.obj : error LNK2001: unresolved external symbol "char const * const wxTextCtrlNameStr" ([email protected]@3QBDB)
1>panelctrl.obj : error LNK2001: unresolved external symbol "char const * const wxCheckBoxNameStr" ([email protected]@3QBDB)
1>panelctrl.obj : error LNK2001: unresolved external symbol "char const * const wxRadioButtonNameStr" ([email protected]@3QBDB)
1>panelctrl.obj : error LNK2001: unresolved external symbol "char const * const wxSliderNameStr" ([email protected]@3QBDB)

I have no idea where the symbols "wxTextCtrlNameStr", "wxCheckBoxNameStr", "wxRadioButtonNameStr", "wxSliderNameStr" came from. I searched the entire project and found nothing. I also used the dumpbin utility to list all the symbols in the object file "panelctrl.obj". The output was attached.
Please help! Thanks!
Attachments
panelctrl.txt
(338.94 KiB) Downloaded 44 times
Jian

Lloyd
Super wx Problem Solver
Super wx Problem Solver
Posts: 350
Joined: Wed May 03, 2006 2:36 pm
Location: India
Contact:

Post by Lloyd » Tue May 27, 2008 6:01 am

Whether your wx build is dll?

Then you have to add WXUSINGDLL macro in your project settings. (in the C++, preprocessor part).

or are you forgetting to add depending wx libraries in the depending libraries list?

eewujian
In need of some credit
In need of some credit
Posts: 2
Joined: Tue May 20, 2008 6:08 pm

Problem resolved

Post by eewujian » Thu May 29, 2008 9:01 pm

I'm using dlls. The errors were gone after WXUSINGDLL was added. Thanks a lot!
Jian
Jian

Post Reply