Author Topic: compilation problem  (Read 5398 times)

Offline asqz

  • Single posting newcomer
  • *
  • Posts: 5
compilation problem
« 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.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: compilation problem
« Reply #1 on: November 14, 2010, 12:23:41 am »
Does mingw32-g++.exe exist in the bin-folder below the compilers installation directory ?

Offline xunxun

  • Almost regular
  • **
  • Posts: 187
Re: compilation problem
« Reply #2 on: November 14, 2010, 09:28:40 am »
I think your compiler's configure in C::B is not right.
Regards,
xunxun

Offline asqz

  • Single posting newcomer
  • *
  • Posts: 5
Re: compilation problem
« Reply #3 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

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: compilation problem
« Reply #4 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.

Offline thundercrawl

  • Single posting newcomer
  • *
  • Posts: 8
Re: compilation problem
« Reply #5 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...

Offline cxwshawn

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: compilation problem
« Reply #6 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

Offline asqz

  • Single posting newcomer
  • *
  • Posts: 5
Re: compilation problem
« Reply #7 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.

Offline asqz

  • Single posting newcomer
  • *
  • Posts: 5
Re: compilation problem
« Reply #8 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

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: compilation problem
« Reply #9 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/ .

Offline asqz

  • Single posting newcomer
  • *
  • Posts: 5
Re: compilation problem
« Reply #10 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.