How to install MinGW compiler ?

Sep 1, 2010 at 5:24pm
Hi there,

I have a question regarding installation MinGW compiler. I've downloaded all compiler's files according to this page:

--- http://www.mingw.org/wiki/Getting_Started

(manual installation), and extracted all of them to C:\MinGW. This is a screenshot of that folder:

--- http://a.imageshack.us/img185/3240/95914978.png

But how can I install MinGW now ? There isn't any setup.exe there...

Do you have any ideas ?

Thx for help :)
Sep 1, 2010 at 6:15pm
You should continue reading that page you linked. It answers your question and tells you exactly what you need to do.

that page wrote:

extract the files from each package, and add C:\MinGW\bin; to your PATH environment variable:



Of course I would recommend you just get an IDE that bundles all of this in one "setup.exe" package so you don't have to deal with all of this crap.

http://www.cplusplus.com/forum/articles/7263/ <---
Sep 1, 2010 at 6:36pm
1. Download MinGW-get --> http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get/mingw-get-0.1-alpha-3/mingw-get-0.1-mingw32-alpha-3-bin.zip/download <-- and extract the zip file to C:\MinGW

2. Open the Control Panel -> Classic View -> System -> Advanced -> Environment Variables.

3. In the System variables box, find Path and double click it.

4. At the end of the line, type
 
;C:\MinGW\bin


5. Open the command prompt and type:
 
mingw-get install g++


Done!
Sep 1, 2010 at 6:36pm
that page wrote:
extract the files from each package


When I try to do that, a message asking me about overwrite A LOT OF folders and files appears...

Of course, those files and folders are different...
Sep 1, 2010 at 6:38pm
programmer47, thanks.

I saw this before, but this is the alpha installer. Is it stable ?
Sep 1, 2010 at 6:40pm
@john891: try what I said, its simpler and it only downloads g++ (the c++ compiler). that screenshot is of the whole compiler collection, i'm assuming you only want the c++ compiler?
Sep 1, 2010 at 6:41pm
john891, you beat me too my post :)
Its stable enough, I've used it without problems.
Sep 1, 2010 at 6:41pm
It's probably better to use the TDM release:
http://tdm-gcc.tdragon.net/

Even better would be to use the previous TDM release that comes bundled with Code::Blocks:
http://www.codeblocks.org/downloads/26

The new 4.5.0 release had some problems when I tried it (some missing header files and no OpenMP support, iirc).
Sep 1, 2010 at 9:00pm
Damn, when I try to link my wxWidgets project in wxDev-C++, I get a lot of the same errors (about 600):

[Warning] auto-importing has been activated without --enable-auto-import specified on the command line.
[Linker Error] undefined reference to `__dyn_tls_init_callback'
[Linker Error] undefined reference to `__gxx_personality_sj0'
[Linker Error] undefined reference to `_Unwind_SjLj_Register'
[Linker Error] undefined reference to `_Unwind_SjLj_Unregister'
[Linker Error] undefined reference to `_Unwind_SjLj_Resume'


What is going on ? :/
Last edited on Sep 1, 2010 at 9:01pm
Sep 2, 2010 at 1:56pm
You're probably either not linking libstdc++ (which normally happens automatically if you invoke g++) or you're trying to reuse object files that were compiled with a different version of MinGW.
Sep 2, 2010 at 2:41pm
Never mind... I decided to change IDE for wxWidgets and I've choosen Code::Blocks.

But when I try to compile wxWidgets, I can't even run mingw32-make as my MinGW version doesn't have it!

It should be in the bin folder - but it isn't there...
Last edited on Sep 2, 2010 at 3:53pm
Sep 2, 2010 at 4:03pm
Uninstall your current version of MinGW and install the Code::Blocks bundle. The version of MinGW that comes with it does have mingw32-make.
Sep 2, 2010 at 7:26pm
I wanted to do this, but when a new version of MinGW will be released, I'll have to wait until a new version C::B bundle will be published...
Sep 2, 2010 at 8:24pm
No, you can just install the new MinGW version and instruct Code::Blocks to use that one instead of the bundled one.
You can also use both by creating a new compiler preset.
Topic archived. No new replies allowed.