Unsolved I'm going crazy because of Mac OSX and Qt!
-
What does the compile output show ?
-
Please have a look at the above screenshot.
-
-
-
@Diracsbracket you too?
-
Has someone got any idea to solve?
-
@mrdebug
Hi,
I've just had a look into the header fileqcompilerdetection.h
(see this link) as it is the one raising the error in your screenshot. I searched for your error and found only 1 occurence for it in the file:559 #ifdef __cplusplus 560 # if __cplusplus < 201103L && !defined(Q_CC_MSVC) 561 # error Qt requires a C++11 compiler and yours does not seem to be that. 562 # endif 563 #endif
So, I tried to check the value of
__cplusplus
in my case, by putting the following in e.g.main.cpp
:#define DISPLAY_VALUE2(x) #x #define DISPLAY_VALUE(x) DISPLAY_VALUE2(x) #pragma message(DISPLAY_VALUE(__cplusplus))
It shows that on my system, the value is
201103L
, thus OK.What does it show when you use it?
-
@mrdebug
In addition, the Makefile of my test program has the following line:CXXFLAGS = -pipe -stdlib=libc++ -g -std=gnu++11 $(EXPORT_ARCH_ARGS) -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -mmacosx-version-min=10.10 -Wall -W -fPIC $(DEFINES)
The interesting part here is
-std=gnu++11
.
Would addingQMAKE_CXXFLAGS += -std=gnu++11
in your.pro
file make any difference? -
After may hours spent on searching the solution I have moved the project in another directory. Now the project (without any editing) was been compiled.
After that I have moved the project in its own default directory. After a clean the project was been compiled without any problem. -
What were the paths ?
-
Before
/Users/denis/IOManager/IOManager
After
/Users/denis/Cpp/IOManager/IOManager -
And just moving it fixed the issue ?
-
Yes I do.
It sounds to be very strange but I don't remember to have did something else.
I have tried to clean the output directory, by deleting the non visible files without to resolve.Really I am very confused.
-
Strange indeed. Oh well, the essential is that you have it working now.