Jump to content
  • Advertisement
Sign in to follow this  
Geometrian

wxWidgets Compiling on Windows

This topic is 2609 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi,

This REALLY shouldn't be this difficult. I've spent the past four hours making slow progress.

Okay, so I've downloaded wxWidgets 2.9, and compiled every configuration in the wx.dsw file. (Note: some project configurations do not build completely. For example, for the configuration DLL Debug, 10 succeed, 12 fail (the first error is "LINK : fatal error LNK1104: cannot open file '..\..\lib\vc_dll\wxmsw29ud_adv.lib'")).

I attempted to make a new project to get at least something working. In my code, I go:[source]#include <wx/string.h>

int main(int argc, char *argv[]) {
wxPuts(wxT("A wxWidgets console application"));
return 0;
}[/source]. . . and get a crapload of linker errors concerning std::basic_string and the like. I added[source]#define WXUSINGDLL[/source]. . . to the top, and I get much fewer linker errors:[source]1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::~wxString(void)" (__imp_??1wxString@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl wxPuts(class wxString const &)" (__imp_?wxPuts@@YAHABVwxString@@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall wxString::wxString(wchar_t const *)" (__imp_??0wxString@@QAE@PB_W@Z) referenced in function _main
1>C:\dev\C++\Test WX\Debug\Test WX.exe : fatal error LNK1120: 3 unresolved externals[/source]

I'm not even sure linking against dlls is a good plan--for distribution, wouldn't the dlls also have to be distributed? In any case, I can't get anything in wxWidgets to compile at all!!!

Help!
Ian

Share this post


Link to post
Share on other sites
Advertisement
Heheh, yea, wxWidgets gave me trouble as well. I figured if it gave me that much trouble just getting the thing to compile, I'd probably fight with it all through trying to use it too. So I dropped it and went with Qt instead, and it's so wonderful I am more and more switching over to the entire suite of Qt libraries and not just the GUI stuff. It's the cleanest, best designed, most extensive, most flexible, and best documented, C++ library with the largest community of any library I've ever used so far. It's cross-platform, and true opensouce with LGPL license.
When I say it's extensive and well designed, think Boost. It's entirely inter-operable with the C++ standard library, but offers replacement classes for the majority of it anyway, and the replacement classes are way better in terms of flexibility and features. I've even switched to the Qt IDE. biggrin.gif

So uh, sorry I can't help with your wxWidgets problem. smile.gif
The best I can do is offer an alternative.

fanatic.png

Share this post


Link to post
Share on other sites

...


How did you compile wxWidgets? Have you setup all the .libs?

wxmsw29ud_adv.lib
wxmsw29ud_core.lib
wxbase29ud.lib
wxtiffd.lib
wxjpegd.lib
wxpngd.lib
wxzlibd.lib
wxregexud.lib
wxexpatd.lib


Try compiling and running a sample.


Qt fanatic.


I agree with this. The only problem is it's pretty hard to use any other IDE but Qts...

Share this post


Link to post
Share on other sites
I dont remember 2.9 having trouble compiling but in previous versions I remember I had to build multiple times (not rebuild, build) using the wx.dsw solution. It seems some of the libs depend on others and the order they build is wrong. So hitting build once will build some, building again will build a few more (using the ones from build 1), and so on, eventually they all built.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!