Page 1 of 1

Example Project using wxwidget

Posted: Thu Jul 28, 2011 4:00 am
by Diane
Hallo
I have installed a self compiled "CodeLite 2.10.0.4778" on Arch Linux :lol:
and wxgtk (2.8 not self compiled).
My problem is the compiler and linker settings in codelite. (
here are some files (i.e *.h) /use/include/wx-2.8/wx - compiler finds nothing)

Please have anyone a example with all files (.workspace), a very small example for a console application.
I try to learn wxwidget with this Tutorial without any Information how to set up the ide.

thanks,
Diane

Re: Example Project using wxwidget

Posted: Thu Jul 28, 2011 3:19 pm
by DavidGH
Hi Diane,
here are some files (i.e *.h) /use/include/wx-2.8/wx - compiler finds nothing)
A typo for /usr presumably... Do you mean that the wx headers don't exist there, or that CodeLite isn't looking for them there?
Please have anyone a example with all files (.workspace), a very small example for a console application.
One comes with CodeLite :) .
Create a workspace (if you haven't already), then Workspace > New Project. In the top left of the dialog, 'Categories' will be set to 'GUI'. Change that to 'Console'.
Then chose (presumably) 'Simple executable (wxWidgets enabled)', and provide a name for it.

After you've shown it works, look at the Project Settings: you'll see that wx-config features in both the Compiler and the Linker sections. Use of the wx-config script is how the correct compiler and linker settings are generated for all wxGTK projects. Try running, in a terminal: wx-config --help

BTW, if you are interested in wx console apps in particular, have a look at the 'console' sample that comes with the wx source. (I don't know if the samples are part of the Arch package, but you can always download a tarball.)

Regards,

David