hetelek
hetelek

Reputation: 3886

Remove flags (-fpermissive) from Makefile (Qt)

I have Googled everywhere, and have not managed to figure out how to remove the -fpermissive flag from my Qt-generated Makefiles. The -fpermissive flag is defaultly there, even if I do QMAKE_CXXFLAGS -= -fpermissive in my Qt project file, attempting to remove it. Here is my Makefile where the flags are:

CFLAGS        = -fpermissive -finline-functions -Wno-long-long -g -Wall $(DEFINES)
CXXFLAGS      = -fpermissive -finline-functions -Wno-long-long -g -fexceptions -mthreads -frtti -Wall $(DEFINES)

How can I remove these?

Upvotes: 1

Views: 5087

Answers (1)

Jamin Grey
Jamin Grey

Reputation: 10487

My QtCreator-generated makefiles don't have -fpermissive anywhere in them, at least as far as I can Ctrl+F. Check your project's Build Settings, and make sure you don't have -fpermissive in there as command-line arguments.

enter image description here

This is the the same two lines in my QMake-generated makefile:

CFLAGS        = -pipe -fno-keep-inline-dllexport -O2 -Wall -Wextra $(DEFINES)
CXXFLAGS      = -pipe -fno-keep-inline-dllexport -O2 -std=c++11 -frtti -Wall -Wextra -fexceptions -mthreads $(DEFINES)

My makefiles also references a file called 'qmake.conf', which for me is located at: C:/Qt/Qt5.0.1/5.0.1/mingw47_32/mkspecs/win32-g++/qmake.conf

It looks like the qmake.conf is used to help generate makefiles for different compilers and platforms, and can add arguments to your makefile.

Upvotes: 1

Related Questions