Qt Library project not compiling on iOS when using gui module
-
Created a Qt Library (shared) project for iOS. It has to be shared library (dylib) so that I can load dynamically in a Xamarin app. The problem is if I include gui module in the project (have to QImage), then the project fails to compile with error below. However, if I remove gui module (and reference to QImage) or make it a static library, then the project builds fine.
Since I need QImage support (don't need to display any UI etc), is there a way to include gui module and still build a shared library?
Undefined symbols for architecture arm64: "_main", referenced from: user_main_trampoline() in libqios.a(qioseventdispatcher.o) (maybe you meant: _qt_main_wrapper, _jinit_d_main_controller , _jinit_c_main_controller ) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [libQtLibrary.1.0.0.dylib] Error 1 03:16:28: The process "/usr/bin/make" exited with code 2. Error while building/deploying project QtLibrary (kit: Qt 5.15.11 for iOS) The kit Qt 5.15.11 for iOS has configuration issues which might be the root cause for this problem. When executing step "Make"
-
I found this post: https://gist.github.com/agirault/3244bf956c2cad7217b148291135f85e?permalink_comment_id=2993733#gistcomment-2993733
If you scroll down towards the end, section 2.3. He makes a point about how Qt doesn't support it but its related to Qt 5.13 and post is from 2019. Wondering if there is any solution to this now? There has to be a way to build a shared library that uses Qt framework.