Solved Qt Creator and iOS
-
Yes. Check it out:
-
IIRC, you should rather have
LIBS += -F $ $PWD/iOS
(minus the spaces) -
Compilation works, but the editor still highlights Objective-C code... =(
ios { QMAKE_CXXFLAGS += -std=c++11 -stdlib=libc++ QMAKE_LFLAGS += -stdlib=libc++ OBJECTIVE_SOURCES += mycontroller_ios.mm QMAKE_INFO_PLIST = ios/Info.plist LIBS += -lz -F$$PWD/ios -framework UIKit -framework FBSDKCoreKit -framework FBSDKLoginKit }
-
Did you try using the clang code model ?
-
Hi. What do you mean by that?
-
Qt Creator provides two code models (the beast that analyses your projects and provides all the nice stuff like auto-completion of your classes etc.) The default and the clang implementation that you can activate through the About Plugins menu.
-
You nailed it!
For those interested:
http://doc.qt.io/qtcreator/creator-clang-codemodel.html
After enabling the plugin, go to
Preferences > C++ > Code Model
I changed both "Objective C" and "Objective C++" to clang. After that, the highlighting is gone.
It seems ok now. I can't test it properly, because I just upgraded to XCode 7 and broke Qt Creator's support for iOS, but it feels like to right solution.
Thank you.
-
What did break ?
-
Apparently, Qt Creator is not compatible with XCode 7 toolchain. After upgrading, the compiler for iOS went missing.
-
What version of Qt Creator are you using ? IIRC Qt Creator 3.5.1 and Qt 5.5.1 don't suffer from that problem.
-
I'm using Qt 5.5.0 with Qt Creator 3.4.2. Maybe that's why, but I've already came to terms with using XCode. It works fine.
Thank you.