tags:

views:

142

answers:

2

Where can I find an writeup that shows me how to set up a tool chain for WxWidgets (C++) on linux/ubunto and/or OS X.

I downloaded, compiled & installed WxWidgets both on linux and OS X, compiled and tried the samples, but seem to be stuck setting up a compile environment in my own home directory.

DialogBlocks from http://www.dialogblocks.com looked promising, but it insists on recompiling WxWidgets again and again .. must be something about it I don't understand.

Writing code from scratch seems to fail due to a lack of paths to libraries, tools or whatnot .. again a lack og understanding on my part, I am sure.

So, can anyone point me to a tool chain setup, that has more than the bare minimum of instructions and fills in some of the "why" instead of only the minimal "what".

+2  A: 

Like all C/C++ programs, the compiler has to know in what directories to look for include files, and the linker has to know what libraries it should link to.

The WxWidgets package, if installed correctly, includes the program wx-config. This can be used while compiling and linking, like so:

g++ $(wx-config --cxxflags) -c my_prog.cpp
g++ my_prog.o $(wx-config --libs) -o my_prog
gnud
You want to move the libs to AFTER the .o files. It works on some platforms, but only because the dynamic loader is fixing it all up at runtime... and won't work at all on others because the linker wants to operate generally left to right on its arguments.
RBerteig
A: 

I've found these two pages to be of help when setting up wxWidgets for Eclipse and MinGW.

aib