Page 1 of 1

How to compile wxWidget Executable project statically?

Posted: Wed May 01, 2013 1:54 am
by szmitek
I compile wxWidget Executable project in release mode. I receive error notice about the lack of wxbase294u_gcc_cl.dll when I run EXE application outside CodeLite. How to set CodeLite to compile my project statically?

Re: How to compile wxWidget Executable project statically?

Posted: Wed May 01, 2013 9:17 am
by eranif
You need to have a wxWidgets compiled statically
Once you have compiled wxWidgets statically, change the environment variable 'WXCFG' from Settings -> Environment variables to point to the correct relative path

FYI:
codelite uses the wx-config tool to locate wxWidgets (this is by default) you can also set it manually without

For example, to get the libraries needed for the link, codelite adds this to the makefile:

Code: Select all

$(shell wx-config --libs)
to get the flags for compilation:

Code: Select all

$(shell wx-config --cflags)
The above are set in the project settings (right cilck on your project and select 'Settings', then in the project settings dialog: General -> Common Settings -> Compiler (or Linker))

The wx-config tool uses 2 environment variables:
WXWIN -> points to the base location where you compiled wxWidgets
WXCFG -> which configuration to pick ( by default it is set to gcc_dll\mswu)

Since you are using the wxWidgets that I have compiled, you only have the DLL version - I don't provide a static wxWidgets binaries - this you will have to do by yourself

Eran