Building and running a project with subdirs for iOS Simulator
I'm having issues building a project targeting the iOS Simulator. To reproduce, I created the simplest project possible which contains 1 main app (template app) + 1 lib (template lib). Link here.
Using Qt Creator 4.2.1 + Qt 5.7.1 iphonesimulator-clang++, I can't build and run the app for the iOS Simulator. Qt will keep specifying iPhoneOS sysroot with architectures armv7/arm64 for the library and then, the app won't be able to link to it because it's missing the i386/x86_64 archs obviously.
I don't have an answer for you, but I am running into the same problem. Your sample project has been a great help as I try to play around with the mkspecs to get things working. I was using 5.6.2, I just installed 5.8.0 to see if there's been any change.
To update, using 5.8.0 I was able to successfully get your program to link and run in the simulator.
Note that I did have to add
LIBS += ../testlib/testlib.o
to your testapp.pro
@abader It was suggested to me by Qt staff (through a support request) to use LIBS += ... and somehow it worked only once. Andy from Qt guesses that I have some stray qmake cache files that I might have missed when clearing output.
Thank you for the reply, glad to learn there's a solution besides having me group all source files into the same project just for iOS. The simulator is useful for testing and getting screen captures when submitting to the App Store.