Professional Documents
Culture Documents
http://wiki.wxwidgets.org/Cygwin
Cygwin
From WxWiki
NOTICE wxWidgets has migrated to using Subversion, instructions for checkout are obsolete.
Contents
1 To set up wxWidgets using Cygwin 2 To get an executable independent of Cygwin DLL 3 To test your installation 4 To generate Win32 applications rather than console apps 5 Troubleshooting
Alternatively, you can download the wxX11 Release (http://www.wxwidgets.org/downloads/) (don't download the Windows Installer). if compiling the cvs head fails, you should have better success with an older release:
cvs -d :pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets checkout -r WX_2_8_BRANCH wxMSW
cd wxWidgets and run the configure script with the desired parameters. Example:
./configure --with-msw --enable-debug --enable-debug_gdb --disable-shared
If compiling fails with "[wxtiff_tif_jpeg.o] Error 1", use the built-in jpeg support. Example:
./configure --with-msw --enable-debug --enable-debug_gdb --disable-shared --with-libjpeg=builtin
you may have to fix dependencies by running again setup.exe of Cygwin and installing the missing packages.
1 of 3
08-06-2012 10:17 PM
Cygwin - WxWiki
http://wiki.wxwidgets.org/Cygwin
make
make
NOTE: If you don't configure with "--disable-shared", you will be unable to compile contrib libraries. NOTE2: Make sure the path to wxWidget directory doesn't contain a space or the make will fail.
2.8.0 To remove all traces of cygwin-dependence, I had to do the following (assuming you are building under bash) export CFLAGS=-mno-cygwin export CPPFLAGS=-mno-cygwin export CXXFLAGS=-mno-cygwin export LDFLAGS="-mno-cygwin -mwindows" ./configure --build=i686-pc-mingw32 --disable-precomp-headers --without-expat Note that you might be able to omit some of the above command-line options, as they were related to my particular version of cygwin (1.5.23-2) and gcc version 3.4.4 (cygming special, gdc 0.12, using dmd 0.125) make make samples
08-06-2012 10:17 PM
Cygwin - WxWiki
http://wiki.wxwidgets.org/Cygwin
Include the linker flag '-mwindows' to produce a Win32 app, i.e. one which doesn't pop up a console as well as your GUI. If you are using a configure script, this can be achieved with 'export LDFLAGS=-mwindows' before you run configure.
Troubleshooting
If you get
undefined reference to `_IID_IPersistFile'
On various forums people mention about compilation errors under Cygwin and in most cases these reports remain unsolved. If you have such problem, in majority of cases there is a conflict between Cygwin environment and other utilities/tools installed in the system. The standard PATH variable in Cygwin is constructed from windows PATH variable. Therefore, you can run utils or even compiler from for example MinGW even not knowing about it. Check the PATH environment and correct to point only onto Cygwin directories. Then do make clear and rerun whole configure-make procedure. Retrieved from "http://wiki.wxwidgets.org/Cygwin" This page was last modified on 19 April 2012, at 14:33.
3 of 3
08-06-2012 10:17 PM