Return Qt during release

3
When I compile my project as debug , it works normally, but when I try to compile in release the following message appears in 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"

Would anyone know why?

    
asked by anonymous 23.02.2015 / 20:04

1 answer

2

The problem for the following reason, because my application is multiplatform (windows / linux), I added:

-QMAKE_CXXFLAGS_RELEASE -= -O2

-QMAKE_CXXFLAGS_RELEASE += -Od

To remove messages from my compiler from C of windows, however I did not put the win32: tag on these lines and the linux c compiler did not understand, after adding it, it worked correctly.

    
24.02.2015 / 12:22