News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

cant build and run my program?

Started by KrazyGrenade, September 26, 2008, 11:44:36 PM

Previous topic - Next topic

KrazyGrenade

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

Jenna

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".

KrazyGrenade

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

Jenna

Quote from: KrazyGrenade 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

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).

KrazyGrenade

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?

Jenna

Quote from: KrazyGrenade 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?

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.