Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

Qt54, using QCA for iOS Emulator and Device, cannot link QCA libraries for iOS platforms

$
0
0
Hello forum members, Having trouble building latest QCA sources with the 5.4 Qt/iOS environment. Spent couple of days browsing the forums, reading and googling to get the package compiled and linked, but no luck. Also not finding much references to this on the web, there are some words of encouragement, but still I doubt if QCA is even supported for the iOS platform? Running this on OS X 10.9.5, latest XCode, QCA cloned from git://anongit.kde.org/qca.git, Qt 5.4 tried both from standard OSX installers (with iPhone and iPhoneSimulator kits installed) and with compiling 5.4 from sources with only the -sdk iphonesimulator switch. cmake version is 3.1.20141219-g64972. This is what I’m trying (in the same way I got the OS X Desktop version built using the 5.4/clang_64/ environment): export PATH=~/Qt54/5.4/ios/bin:/Applications/CMake.app/Contents/bin:$PATH cd ~/qca ; rm -rf build_ios && mkdir build_ios && cd build_ios cmake -DCMAKE_INSTALL_PREFIX=~/qt-qca -DBUILD_PLUGINS=ossl -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.1h -DOPENSSL_LIBRARIES=/usr/local/Cellar/openssl/1.0.1h/lib -DOPENSSL_INCLUDE_DIR=/usr/local/Cellar/openssl/1.0.1h/include .. cmake goes ok, it identifies Qt5 environment and founds the compiler environment working. One strange thing is how it reports wrong OpenSSL version after listing the given paths: — Found OpenSSL: /usr/local/Cellar/openssl/1.0.1h/lib/libssl.dylib;/usr/local/Cellar/openssl/1.0.1h/lib/libcrypto.dylib (found version “0.9.8za”) Well, make starts compiling and goes nicely all the way up to 48% until it is linking time: Linking CXX shared library ../lib/qca.framework/qca ld: warning: ignoring file /Users/user/Qt54/5.4/ios/lib/libQt5Core.a, missing required architecture x86_64 in file /Users/user/Qt54/5.4/ios/lib/libQt5Core.a (2 slices) Looking into it, the cmake/make end up always using the libQt5Core standard static library. I have not been able to figure out how to declare building for the iOS simulator so that libQt5Core_iphonesimulator.a would get used. Or even how to cross-compile the libraries for the arm architecture. Eventually I would need the QCA library and relevant plugins built for both the simulator and real iOS devices. I don’t have any prior experience using Qt or cmake, but tried to look up the configuration directives and commands for library loading suffixes and how the package finding works, but it just always sticks with the plain libQt5Core.a library. It’s really a double problem, it’s trying to build for some OS X platform but defaults to the arm-binaries. $ cd ~/Qt54/5.4/ios/lib/ ; ls libQt5Core*.a libQt5Core.a    libQt5Core_debug.a   libQt5Core_iphonesimulator.a  libQt5Core_iphonesimulator_debug.a   $ lipo -info libQt5Core.a Architectures in the fat file: libQt5Core.a are: armv7 arm64   $ lipo -info libQt5Core_iphonesimulator.a Architectures in the fat file: libQt5Core_iphonesimulator.a are: i386 x86_64 The Qt5 libraries here make perfect sense, but how to build the QCA package appropriately for both architectures and environments, in order to be able to use this in QtCreator projects? I have tried importing the QCA CMakeLists.txt as a project to QtCreator but there is no iOS generator. Also tried the Xcode generator for CMake and opened up the created XCode project file in Xcode but that only had OS X build targets. Also tried creating toolchain files for CMake, attempting to force the compiler to the clang under XCode’s iPhoneSimulator directory tree but this didn’t get me anywhere as the basic compiler tests already started to fail. If somebody is actually using QCA in iOS environment, any pointers would be highly appreciated. Thank you!

Viewing all articles
Browse latest Browse all 2113

Trending Articles