0
votes

when I compile my project as debug, it usually works , but when I try to build in release the following message appears on the compile Output:

cc1plus : error: argument to ' O ' should be a non-negative integer, 'g' , 's' or 'fast' make: *** [ main.o ] Error 1 ... : The process " / usr / bin / make " exited with code 2 .

Error while building/deploying project 'project_name' (kit: Desktop Qt 5.4.0 GCC 64bit) When executing step "Make"

Anyone know the reason?

1
What CXXFLAGS is set to in your Makefile?svlasov
Thank you, had not noticed that the " CXXFLAGS_RELEASE " was like: "QMAKE_CXXFLAGS_RELEASE - = -O2 QMAKE_CXXFLAGS_RELEASE + = -Od " to remove some messages from my windows compiler . So I put the tag " win32: " and it worked .Jhonny Pinheiro

1 Answers

1
votes

For my application is cross platform ( Windows / Linux ) , I added:

-QMAKE_CXXFLAGS_RELEASE - = -O2

-QMAKE_CXXFLAGS_RELEASE + = -Od

To remove a message from my C compiler windows , but did not put the tag win32: in these lines and the Linux C compiler did not understand, after added there, work ok.