Installing MinGW / gdb on Winodws

CodeLite installation/troubleshooting forum
User avatar
eranif
CodeLite Plugin
Posts: 5934
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Installing MinGW / gdb on Winodws

Post by eranif » Sat Sep 20, 2008 9:27 am

Here is a short tutorial for how to install MinGW/gdb to work with CodeLite

1. Download MinGW from here: http://downloads.sourceforge.net/codeli ... irror=mesh
2. Once downloaded, extract its content into 'C:\'
3. Clear the value set in 'Settings -> Debugger Settings...' Debugger Path
4. Set the value of 'Build Tool' in 'Settings -> Build Settings ...' to be 'mingw32-make.exe
5. Add the C:\MinGW\bin to your environment variable:
a. Open environment variable dialog from 'Settings -> Environment Variables'
b. Create new variable
NAME: PATH
VALUE: $(PATH);C:\MinGW\bin

Thats it
Make sure you have read the HOW TO POST thread

adenbley
CodeLite Curious
Posts: 1
Joined: Mon Oct 13, 2008 8:25 am
Contact:

Re: Installing MinGW / gdb on Winodws

Post by adenbley » Mon Oct 13, 2008 8:27 am

i'd like to add that the program should be restarted after these steps.

AngryDog
CodeLite Curious
Posts: 4
Joined: Wed Mar 24, 2010 9:26 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Installing MinGW / gdb on Winodws

Post by AngryDog » Thu Mar 25, 2010 4:24 pm

Damn - wish I'd saw this a couple of days ago. Just installed MinGW manually and spent a day figuring out with components I needed and which I didn't. :)

foxmuldr
CodeLite Expert
Posts: 120
Joined: Sun May 10, 2009 6:56 am
Contact:

Installing new build in Windows

Post by foxmuldr » Thu Sep 30, 2010 5:13 am

How do I install a new build in Windows?

I have been able to download and compile the code, make changes, test them from inside Codelite, and everything works fine. But once I get a release build created, how do I install it? When I try to copy it over the existing .exe and run it, then it reports that it's missing wxmsw28ud_gcc_custom.dll and re-installing the application may fix it. It runs fine from inside Codelite.

Signed, Confused... :-)

- Rick
Best regards,
Rick C. Hodgin
www.Visual-FreePro.org
www.LibSF.org

User avatar
eranif
CodeLite Plugin
Posts: 5934
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Installing MinGW / gdb on Winodws

Post by eranif » Thu Sep 30, 2010 9:57 am

When running from within codelite, codelite adds the path to the 'debug' version of wx dll - this is why it will run for you.
However, when you want to deploy that new build you should run the script 'Runtime\update.bat' from a CMD shell.

Still, you built wx in debug version, so either add the path to the debug version of wx dll to your system path, or copy the debug dll to the installation directory (by default it is C:\Program Files\CodeLite)

Eran
Make sure you have read the HOW TO POST thread

foxmuldr
CodeLite Expert
Posts: 120
Joined: Sun May 10, 2009 6:56 am
Contact:

Re: Installing MinGW / gdb on Winodws

Post by foxmuldr » Thu Sep 30, 2010 10:00 am

...
Last edited by foxmuldr on Sat Nov 06, 2010 6:36 am, edited 1 time in total.
Best regards,
Rick C. Hodgin
www.Visual-FreePro.org
www.LibSF.org

foxmuldr
CodeLite Expert
Posts: 120
Joined: Sun May 10, 2009 6:56 am
Contact:

Error building after 4453

Post by foxmuldr » Thu Oct 28, 2010 1:04 pm

...
Last edited by foxmuldr on Sat Nov 06, 2010 6:37 am, edited 1 time in total.
Best regards,
Rick C. Hodgin
www.Visual-FreePro.org
www.LibSF.org

User avatar
eranif
CodeLite Plugin
Posts: 5934
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Installing MinGW / gdb on Winodws

Post by eranif » Thu Oct 28, 2010 2:14 pm

This can happen because of:
When you did update to codelite sources, you did not reloaded the workspace (thus the link options were not updated and codelite is still using the one)

You should revert any modified files back to the svn version.
close codelite
perform svn update
*make sure there are no local modifications*
open codelite
build

Also: please do not hijack this thread to report codelite compilation errors, it is not related to this thread topic
Eran
Make sure you have read the HOW TO POST thread

HJarausch
CodeLite Veteran
Posts: 98
Joined: Thu Feb 18, 2010 10:54 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Installing MinGW / gdb on Winodws

Post by HJarausch » Thu Apr 07, 2011 2:35 pm

Hi,

I have the problem that some (of many) students see the following linker problem:
(.text+0x11): undefined reference do 'mingw_app_type'
:(.text+0x3b): undefined reference do '_encode pointer'
:(.text+0x40): undefined reference do '__onexitend'

I couldn't check, yet, but it might be in cases where CodeLite has been installed on a drive different from C.

Any hints are very much appreciated,
Helmut.

HJarausch
CodeLite Veteran
Posts: 98
Joined: Thu Feb 18, 2010 10:54 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Installing MinGW / gdb on Winodws (Solved)

Post by HJarausch » Mon Apr 11, 2011 11:37 am

HJarausch wrote:Hi,

I have the problem that some (of many) students see the following linker problem:
(.text+0x11): undefined reference do 'mingw_app_type'
:(.text+0x3b): undefined reference do '_encode pointer'
:(.text+0x40): undefined reference do '__onexitend'
Hi,
the father of one of my students could solve this. His findings are quite interesting and astonishing.
Here his (translated) comments:

For the linker to run, the library path under
Build-Settings -> Compilers -> gnu g++ -> Advanced
has to be empty !!!
If it contains the correct path : C:\MinGW\lib the object crt2.o from the runtime library
has unresolved symbols. The reason is shown by the full linker statement:

Code: Select all

  "c:/mingw/bin/../lib/gcc/i686-pc-mingw32/4.6.0/../../../../i686-pc-mingw32/bin/ld.exe" "--sysroot=/home/gfortran/gcc-home/binary/  mingw32/cross/x86_32/gcc/4.6-20110312" "-Bdynamic" "-o" "./Debug/HelloWorld.exe" "c:/mingw/bin/../lib/gcc/i686-pc-mingw32/4.6.0/../../../../i686-pc-mingw32/lib/crt2.o" "c:/mingw/bin/../lib/gcc/i686-pc-mingw32/4.6.0/crtbegin.o" "-LC:/MinGW/lib" "-L." "-Lc:/mingw/bin/../lib/gcc/i686-pc-mingw32/4.6.0" "-Lc:/mingw/bin/../lib/gcc" "-Lc:/mingw/bin/../lib/gcc/i686-pc-mingw32/4.6.0/../../../../i686-pc-mingw32/lib" "-Lc:/mingw/bin/../lib/gcc/i686-pc-mingw32/4.6.0/../../.." "./Debug/hello.o" "-lmpreal" "-lmpfr" "-lgmpxx" "-lgmp" "-rpath" "lib" "-lstdc++" "-lmingw32" "-lgcc" "-lmoldname" "-lmingwex" "-lmsvcrt" "-ladvapi32" "-lshell32" "-luser32" "-lkernel32" "-lmingw32" "-lgcc" "-lmoldname" "-lmingwex" "-lmsvcrt" "c:/mingw/bin/../lib/gcc/i686-pc-mingw32/4.6.0/crtend.o"
If the library path given in Build-Settings -> Compilers -> gnu g++ -> Advanced would be inserted before crt2.o and crtbegin.o
it would work.

Furthermore, for the debugger to run, one has to edit C:\MinGW\registry.ini
[environment]
mingw=*C:\MinGW*

and the debugger path under Settings, Debugger Settings has to be empty.

What do I have to change with my InnoSetup config file to dispense with that?

Many thanks for a hint,
Helmut.

Post Reply