Page 1 of 1

Setting up CodeLite 10, TDM-GCC 5.1 + wxWidgets 3 on WinXP

Posted: Sun Apr 09, 2017 2:43 pm
by waiter
Dear All,

I have been struggling for days to set up a working, up-to-date CodeLite 10 C++ IDE environment on Windows XP SP3 (32bit) that uses the latest TDM GCC (5.1) compiler and wxWidgets (3.0.2) library. This solution probably works on more recent versions of Windows however I have not tested it yet. There are lots of pieces of sporadic information out there on the net about the topic but I have not been able to find one that drives the user precisely and reproducibly through the setup process. I want to publish my solution here for the community. Any comments, questions, suggestions are welcome!

This solution was based mainly on the information found on these sites (thanks for their help!!!!):
http://yasriady.blogspot.hu/2015/08/how ... ndows.html
https://forums.wxwidgets.org/viewtopic.php?t=41454

INSTALLATION (from scratch)

1. Download and install MSYS-1.0.11.exe with default options.
https://netix.dl.sourceforge.net/projec ... 1.0.11.exe

2. Open cmd.exe (or through system settings) and add "C:\msys\1.0\bin" to PATH
set PATH=%PATH%;C:\msys\1.0\bin

3. Download and install tdm-gcc-5.1.0-3.exe with default options.
http://sourceforge.net/projects/tdm-gcc ... e/download

4. Download and install wxMSW-3.0.2-Setup.exe with default options.
https://github.com/wxWidgets/wxWidgets/ ... -Setup.exe

5. Create C:\msys\1.0\etc\fstab and put the following 2 lines into it:
C:/TDM-GCC-32 /mingw
C:/wxWidgets-3.0.2 /wxwidgets-3.0.2

6. Start MSYS and apply the following commands to configure wxWidgets:
$ ./configure --enable-debug --disable-shared --with-msw

7. Build "debug" and "release" versions of wxWidgets library in MSYS
$ cd /wxwidgets-3.0.2/build/msw
$ mingw32-make -f Makefile.gcc SHARED=0 UNICODE=1 BUILD=debug VENDOR=cl CXXFLAGS="-Wno-deprecated-declarations -fno-keep-inline-dllexport -std=gnu++11" MONOLITHIC=1
$ mingw32-make -f Makefile.gcc SHARED=0 UNICODE=1 BUILD=release VENDOR=cl CXXFLAGS="-Wno-deprecated-declarations -fno-keep-inline-dllexport -std=gnu++11" MONOLITHIC=1

8. Download, unzip (7zip) and install CodeLite (now v10.0) with default options.
https://downloads.codelite.org/downloads.php?windows

9. Start CodeLite and set the following parameters:
* Settings -> Environment Variables (Ctrl-Shift-V) and paste the following:
WXWIN=C:\wxWidgets-3.0.2
* Settings -> Build Settings -> Compilers -> "MinGW (TDM-GCC-32)" -> Tools tab -> "Make" line
C:/TDM-GCC-32/bin/mingw32-make.exe SHELL=bash.exe
* Settings -> Build Settings -> Compilers -> "MinGW (TDM-GCC-32)" -> File types
Remove double quotation mark (") from "$(FileFullPath)" everywhere
* Settings -> Build Settings -> Compilers -> "MinGW (TDM-GCC-32)" -> Advanced
Uncheck "Pass object list to the linker via file"

10. You are all set and you can start your own wxWidgets project by creating a new workspace and wxWigets enabled project.
You can select "debug" or "release" version of wxWidgets by setting the following:
Project Settings -> select "Debug" or "Release" from drop-down list -> Environment:
"Additional environment variables:" can be set to: "WXCFG=gcc_lib/mswu" OR "WXCFG=gcc_lib/mswud" if you want
"release" OR "debug" version linked respectively.

SHA1 sums of used files:
b5ac9abe8abe717275790036e9312a68ab65ee06 codelite-x86-10.0.0.exe
1edad9d1b67b48c92781b3ccddbd1cc9ce64d78a MSYS-1.0.11.exe
eac5ad38d7d29989619cd871f2c1d57079a0dd67 tdm-gcc-5.1.0-3.exe
ceac35caeab6a0d3bdc6715b23dde82812ed8f7f wxMSW-3.0.2-Setup.exe

Hoping it will be useful for everybody,
Peter