Author Topic: cant build and run my program?  (Read 4687 times)

Offline KrazyGrenade

  • Single posting newcomer
  • *
  • Posts: 5
cant build and run my program?
« on: September 26, 2008, 11:44:36 pm »
this is the error i get when i try to build and run

-------------- Build: Debug in hey ---------------

Compiling: main.cpp
mingw32-g++.exe: `-b' must come at the start of the command line
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
 
anyone know how to help me? thanks

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: cant build and run my program?
« Reply #1 on: September 26, 2008, 11:49:08 pm »
It would be very helpful if you can turn on full commandline logging and post the "Build Log":

Change "Settings -> Compiler and debugger... -> Global compiler settings -> Other settings(rightmost tab) -> Compiler logging" to "Full commandline".

Offline KrazyGrenade

  • Single posting newcomer
  • *
  • Posts: 5
Re: cant build and run my program?
« Reply #2 on: September 27, 2008, 12:16:09 am »
thanks for the quick reply. here is the full build log

mingw32-g++.exe -Wall -fexceptions -w -x  -O2 -O1 -O -w -g -tWV -tWR -tWM -tWD -tWC -tW -6 -5 -4 -3 -y -vi- -vi -v- -v -C -AU -AT -AK -A -K -b- -a16 -a8 -a4 -a2 -a1 -ps -pr -pm -pc -p -fp -ff -f- -f -Ve -Vx -xs -xp -xf -xdg -xd -x- -RT- -k- -d -r- -Ov -O-S -OS -Oi -Od -Oc /Zi -Dgdb.exe     -c "C:\Documents and Settings\KrazyGrenade\My Documents\hey\main.cpp" -o obj\Debug\main.o
mingw32-g++.exe: `-b' must come at the start of the command line
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: cant build and run my program?
« Reply #3 on: September 27, 2008, 12:59:44 am »
thanks for the quick reply. here is the full build log

mingw32-g++.exe -Wall -fexceptions -w -x  -O2 -O1 -O -w -g -tWV -tWR -tWM -tWD -tWC -tW -6 -5 -4 -3 -y -vi- -vi -v- -v -C -AU -AT -AK -A -K -b- -a16 -a8 -a4 -a2 -a1 -ps -pr -pm -pc -p -fp -ff -f- -f -Ve -Vx -xs -xp -xf -xdg -xd -x- -RT- -k- -d -r- -Ov -O-S -OS -Oi -Od -Oc /Zi -Dgdb.exe     -c "C:\Documents and Settings\KrazyGrenade\My Documents\hey\main.cpp" -o obj\Debug\main.o
mingw32-g++.exe: `-b' must come at the start of the command line
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

It looks like you try to use Borland C++ compiler flags for MinGW gcc.
Where do you set them? In "Build options -> Compiler settings -> Other settings" ?

If yes, remove them and use only the appropriate gcc-flags.

Btw you have many flags that don't make sense if used together (e.g. optimize for i386, for i486, for Pentium and for Pentioum Pro/II, or optimize for size and for speed, or windows application and console application).

Offline KrazyGrenade

  • Single posting newcomer
  • *
  • Posts: 5
Re: cant build and run my program?
« Reply #4 on: September 27, 2008, 07:53:30 am »
I dont understand what flags im supposed to have on or take off. I removed all the text that was in other options "-w -x  -O2 -O1 -O -w -g -tWV -tWR -tWM -tWD -tWC -tW -6 -5 -4 -3 -y -vi- -vi -v- -v -C -AU -AT -AK -A -K -b- -a16 -a8 -a4 -a2 -a1 -ps -pr -pm -pc -p -fp -ff -f- -f -Ve -Vx -xs -xp -xf -xdg -xd -x- -RT- -k- -d -r- -Ov -O-S -OS -Oi -Od -Oc" should i put it back or what do i need to do to get this workin?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: cant build and run my program?
« Reply #5 on: September 27, 2008, 01:43:20 pm »
I dont understand what flags im supposed to have on or take off. I removed all the text that was in other options "-w -x  -O2 -O1 -O -w -g -tWV -tWR -tWM -tWD -tWC -tW -6 -5 -4 -3 -y -vi- -vi -v- -v -C -AU -AT -AK -A -K -b- -a16 -a8 -a4 -a2 -a1 -ps -pr -pm -pc -p -fp -ff -f- -f -Ve -Vx -xs -xp -xf -xdg -xd -x- -RT- -k- -d -r- -Ov -O-S -OS -Oi -Od -Oc" should i put it back or what do i need to do to get this workin?

This are the flags for Borland C++ I meant.
Don't put them back.

Please read the documentation for the compiler you use (mingw32), before using flags, you don't know or don't understand.