You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Creating static libraries for a multi platform project #546
Hello,
we are developing a mobile game and would like to switch to IXWebSocket for handling socket connections. For this we would need static libraries for the android (armeabi-v7a, arm64-v8a & x86), iOS and mac. We are struggling a bit to compile all these from the project and wondered if we could get some assistance for this case.
The project states it is compatible with android, iOS and mac so would it be possible to get some more detailed instructions for building the project for these platforms? What where the commands/arguments used for compiling libs for these projects by you, the developers?
If all works out I would also be willing to post a PR which includes updates to the README pages for anyone who tries to do the same in the future.
-- TLS configured to use openssl
CMake Error at /Applications/CMake.app/Contents/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
OPENSSL_INCLUDE_DIR)
Call Stack (most recent call first):
/Applications/CMake.app/Contents/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/Applications/CMake.app/Contents/share/cmake-3.26/Modules/FindOpenSSL.cmake:670 (find_package_handle_standard_args)
CMakeLists.txt:209 (find_package)
Any idea how to fix this?
Also I have yet to try building for iOS. As Ive never done this, I would also be grateful for help/pointers there.
Thank you in advance
Linking the android libraries seems to be clashing with our android NDK, resulting in the error android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/bits/fortify/poll.h:59: undefined reference to '__poll_chk'.
Is this simply an error indicating that our android NDK is outdated or would you know more about this?
Activity
bsergean commentedon Apr 9, 2025
We definitely used a static build of this for android on multiple architectures, but we did use cmake at the time + gradle to drive this.
Sokkero commentedon Apr 10, 2025
So far I have been able to build a static lib for the mac target. For android I am using a customised version of the
build_android.shscript.But this results in:
Any idea how to fix this?
Also I have yet to try building for iOS. As Ive never done this, I would also be grateful for help/pointers there.
Thank you in advance
Sokkero commentedon Apr 10, 2025
I found the thread #175 and it seems to have worked using
Now just iOS is missing
Sokkero commentedon Apr 11, 2025
Linking the android libraries seems to be clashing with our android NDK, resulting in the error
android-ndk/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/bits/fortify/poll.h:59: undefined reference to '__poll_chk'.Is this simply an error indicating that our android NDK is outdated or would you know more about this?
bsergean commentedon Apr 13, 2025
ChatGPT recommends this, to compile the library with this option