Code::Blocks Forums

User forums => Help => Topic started by: asqz on November 13, 2010, 06:46:56 pm

Title: compilation problem
Post by: asqz on November 13, 2010, 06:46:56 pm
When i'm trying to build my code  :

#include <iostream>

using namespace std;

int main()
{
cout << "Hello world!" << endl;
return 0;
}

An error message is write :

-------------- Build: Debug in triangle ---------------

Compiling: main.cpp
Execution of 'mingw32-g++.exe -Wall -fexceptions -g -c C:\Users\Guillaume\codeblock\triangle\main.cpp -o obj\Debug\main.o' in 'C:\Users\Guillaume\codeblock\triangle' failed.
Nothing to be done.
Title: Re: compilation problem
Post by: Jenna on November 14, 2010, 12:23:41 am
Does mingw32-g++.exe exist in the bin-folder below the compilers installation directory ?
Title: Re: compilation problem
Post by: xunxun on November 14, 2010, 09:28:40 am
I think your compiler's configure in C::B is not right.
Title: Re: compilation problem
Post by: asqz on November 14, 2010, 05:46:24 pm
In the file : C:\MinGW\bin
I have this applications : mingw32-gcc, mingw32-gcc-4.5.0, mingw32-make, mingw-get... and other stuff but no mingw32-g++.exe

How to know if this is a compiler's configure problem ?

Thx all
Title: Re: compilation problem
Post by: Jenna on November 14, 2010, 05:52:21 pm
In the file : C:\MinGW\bin
I have this applications : mingw32-gcc, mingw32-gcc-4.5.0, mingw32-make, mingw-get... and other stuff but no mingw32-g++.exe

How to know if this is a compiler's configure problem ?

Thx all

If you do not have g++.exe (instead of mingw32-g++.exe) or sometghing similar, you just have no c++ compiler installed.
Title: Re: compilation problem
Post by: thundercrawl on November 16, 2010, 10:28:09 am
I encounter the same issue as you are.

My situation is : enable the staic library for wxwidget lib...

then the compiled exe file cannot be executed , my compiler also is mingw. i check the g++ version is 3.8.1.

So i have to recompiler the wiget to dll shared...

then rebuild the project, the exe file can be executed...

hope helpful for you...
Title: Re: compilation problem
Post by: cxwshawn on November 16, 2010, 11:29:05 am
I encounter the same issue as you are.

My situation is : enable the staic library for wxwidget lib...

then the compiled exe file cannot be executed , my compiler also is mingw. i check the g++ version is 3.8.1.

So i have to recompiler the wiget to dll shared...

then rebuild the project, the exe file can be executed...

hope helpful for you...

u should check menu Settings->Compiler and Debugger settings ->Global Compiler settings -> Toolchain executables and then check
whether your mingw directory is right or not  ~~~

regards
shawn
Title: Re: compilation problem
Post by: asqz on November 17, 2010, 01:00:41 pm
I haven't check my answer yet because i'm not at home from monday to friday but thx all anyway.
Title: Re: compilation problem
Post by: asqz on November 20, 2010, 07:10:09 pm
thanks all

I don't have g++.exe so, according to jens i don't have a compilator, how can I get one ? by the way, is there file to download wich instal code block and all it need in one time, it should be easier.

thundercrawl I don't understand what you told me, can you try to explain more please (i'm a beginner).

thank all
Title: Re: compilation problem
Post by: Jenna on November 20, 2010, 09:07:07 pm
If you use C::B release 10.05, use the installer with mingw in the name and you get Code::Blocks with TDragon's build of the gcc (MinGW) compiler suite (gcc4.4).
Alternatively you can use the installer of the most recent version of TDragons's TDM-gcc : http://tdm-gcc.tdragon.net/ (http://tdm-gcc.tdragon.net/) .
Title: Re: compilation problem
Post by: asqz on November 27, 2010, 07:03:27 pm
thx all i download TDM gcc and it's working now. We will never know what was the problem but it's working now and that's the most important.