Qmake come with Qt5.1.0 (beta) has some problem(bug?)
-
os : mac osx 10.8.3
compiler : gcc4.8The makefiles generated by the qmake of Qt5.0.2 and Qt5.1.0 have some differents
It will always select the default compiler come with XCode(if I interpret the makefile correctly)The make file generated by qmake come with Qt5.1.0 beta
@
####### Compiler, tools and optionsCC = /Applications/Xcode.app/Contents/Developer/usr/bin/gcc
CXX = /Applications/Xcode.app/Contents/Developer/usr/bin/g++
.......
LINK = /Applications/Xcode.app/Contents/Developer/usr/bin/g++####### Output directory
@The makefile come with Qt5.0.2
@
####### Compiler, tools and optionsCC = gcc
CXX = g++
.......
LINK = g++####### Output directory
@There are some problems if the compiler switch to clang too
The compiler will always be the default compiler come with XCode
And the version numbers also has some problemIn Qt5.0.2, if I want to use the features of c++11
I simply add these lines in my .pro file@
mac{
LIBS += -stdlib=libc++QMAKE_CXXFLAGS += -stdlib=libc++
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -mmacosx-version-min=10.7
QMAKE_LFLAGS += -mmacosx-version-min=10.7
}
@But it would not work with the qmake generated come with Qt5.1.0 beta
Edit :
If I change the .pro to
@
mac{
CONFIG += c++11
}
@The codes could compile with Qt5.1.0, but this do not work for gcc