views:

143

answers:

2

Build of configuration Release for project testcase

make all 
Building file: ../atest.cpp
Invoking: GCC C++ Compiler
g++ -I"C:\cppunit\include" -I"C:\cppunit\include\cppunit\extensions" -I"C:\mingw\bin" -O3 -Wall -c -fmessage-length=0, -Wl,-subsystem,console -MMD -MP -MF"atest.d" -MT"atest.d" -o"atest.o" "../atest.cpp"
cc1plus.exe: error: argument to "-fmessage-length=" should be a non-negative integer
make: *** [atest.o] Error 1

actually in my gcc c++ compller has -c -fmessage-length=0 this flag has been given but my in console window showing above error

A: 

This is not actually a make error. make runs other commands (such as g++) to actually build the project. When one of those commands gives an error, make will stop (unless specifically told to ignore the error).

This appears to be a bug in mingw compiler. I've tried -fmessage-length=0 on multiple versions of g++ (4.2.1 for Darwin/Mac, 4.3.2 on Linux) and none of them issued that error (and I could create the error by specifying -fmessage-length=-1).

R Samuel Klatchko
A: 

Remove trailing comma from -fmessage-length=0,

Employed Russian