UI of my application is weird with Qt 4/5 on OS X 10.11 El Capitan
-
Hi and welcome to devnet,
You can disable C++11 so it will link to libstdc++.
CONFIG -= c++11
Other than that Qt 4's last official release supports OS X 10.10, it should work on 10.11 but there's no guarantee as the level of support since Apple is making subtle changes each time.
-
Thank you for your welcoming messages.
@mcosta unfortunately I won't be able to show example of code because the application is about 500 000 lines and as I'm new in the company (and Qt) I don't know where the problem comes from. So if you have an idea of what part of Qt could be responsible of this, I could investigate and show you an example of this part. But basically it's "I've a code which works perfectly on all the mac os x version, when the app is launched on el capitan everything is collapsing".
Concerning the image, as I work for a company I would prefer to not share it. But it's simple to see. Imagine you have a windows with some buttons centred. Once it's launched on el capitan some buttons will disappear and other will be moved.
@SGaist How can I do this in Xcode? In my project Build Settings I can set the "C++ standard library" to libc++ or libstdc++. Is it what you're talking about?
The problem is if I use libstdc++ I get the problem I linked problem-with-qt-5-5 where the solution is to use libc++ but if I do that I couldn't use <tr1/tulpe> anymore... -
I almost manage to compile after changing some include with <QtWidgets> and my moc script from
"moc ${INPUT_FILE_PATH} -f -o ${INPUT_FILE_DIR}/moc_${INPUT_FILE_BASE}.cxx"
to "moc ${INPUT_FILE_PATH} -f ${INPUT_FILE_PATH} -o ${INPUT_FILE_DIR}/moc_${INPUT_FILE_BASE}.cxx"
I don't understand why I needed to add a path after -f because it's said in the doc that the path is optional...But now WOW I've 600 errors! I don't know if hell exists but I think it could look like my project! ahah. The "good" new is that it's always the same error, here is a template
"Undefined symbols for architecture x86_64:
"ClassName::MethodName( various stuff like std::__1::vector<std::__1::queue<float, blabla)", referenced from: -[ClassName MethodName] in FileName.o"Does anybody know what it means?
-
@mcosta I totally understand your thoughts and I'm sorry if I expressed myself poorly but the thing is I' totally new on this project and I know nothing about Qt. That are the reason why I may seem lost.
Furthermore I agree with you that without any code you couldn't help me (or others people who could have the same problems) and I'm glad that you took time to give me some answers. But the thing is that I've 500 000 lines so I just don't know what to show you.The only error I got now is "Undefined symbols for architecture x86_64:
"ClassName::MethodName( parameters)", referenced from: -[ClassName MethodName] in FileName.o" "
Maybe if you already saw this kind of error in Qt I could see in the code and show you the concerned partBy the way, as I discover Qt at the same time, I saw in the project a file named FindQt.cmake and inside it only talksabout Qt3 and Qt4. I guess i need to write a cmake for Qt5, no?
-
@mcosta Thank you for the links.
I took some time to reply because I wanted to be sure about something.I find the real reason about my problem:the build of my libraries. Indeed, some of our in-house libraries are build with libstdc++ and other with libc++. I cannot change this thing for the moment unfortunately. As the version of qt5 that I use prompts me to build in libc++, I get a lot of link error.
So my question is: is it possible to use a version of qt5 builded with libstdc++ ? If not, how could pass through the error no type named 'u16string' in namespace 'std' in qstring.h, using libstdc++ ?
-
Are you by any chance using the old macx-g++ mkspec ? If so, you should change to macx-clang, that should solve your problem.
-
@SGaist I apologize for my "noob" question but... Where can I check in Xcode if we use the old mac-g++ ? I'm really new with qt.
What I did was: download and link qt5 with home-brew and add the frameworks I needed in the "linked frameworks and libraries" part of "General" tab in my Xcode project. -
Did you generate the Xcode project using qmake ?