# OpenSSL iOS build fails on bunch of undefined symbols

**URL:** https://discourse.cmake.org/t/openssl-ios-build-fails-on-bunch-of-undefined-symbols/14273
**Category:** Code
**Tags:** os:ios
**Created:** [June 20, 2025, 6:25pm UTC](https://discourse.cmake.org/t/openssl-ios-build-fails-on-bunch-of-undefined-symbols/14273 "2025-06-20T18:25:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![shokarta](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@shokarta](https://discourse.cmake.org/u/shokarta)
#### Post date: [June 20, 2025, 6:25pm UTC](https://discourse.cmake.org/t/openssl-ios-build-fails-on-bunch-of-undefined-symbols/14273/1 "2025-06-20T18:25:58Z")

</div>

Hello,

I have a 3.3.2 version of iOS (well, now I realy only think its iOS version) which I dont remember how i installed, via brew or sudo perhaps ([attached](https://admin.mamavis.cz/3.3.2.zip) package if needs to be confirmed its realy for iOS and noc macOS only).

in my CMake i initialize it this way:

```auto
...
include("${CMAKE_SOURCE_DIR}/../../extralibs/openssl/ios/lib/cmake/OpenSSL/OpenSSLConfig.cmake")
set(OPENSSL_ROOT_DIR "${CMAKE_SOURCE_DIR}/../../extralibs/openssl/ios")
set(OPENSSL_LIBRARIES "${CMAKE_SOURCE_DIR}/../../extralibs/openssl/ios/lib")
set(OPENSSL_CRYPTO_LIBRARY "${CMAKE_SOURCE_DIR}/../../extralibs/openssl/ios/libcrypto.a") # or *.dylib?
set(OPENSSL_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/../../extralibs/openssl/ios/include")
include_directories(${OPENSSL_INCLUDE_DIR})
find_package(OpenSSL)
...
target_link_libraries(${TARGET_NAME} PRIVATE "${CMAKE_SOURCE_DIR}/../../extralibs/openssl/ios/lib/libssl.a" "${CMAKE_SOURCE_DIR}/../../extralibs/openssl/ios/lib/libcrypto.a") # or *.dylib?

```

NOTE: for windows/android this same (of course with their own target specified libraries) works perfectly!

however upon build this gives me:

 ![image](https://discourse.cmake.org/uploads/default/original/2X/9/9890f740d9a4df0939caab2531e78acb612203a5.png)

is it the version issue or am I missing something?

---

<div class="post-metadata">

### Author: ![shokarta](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/s/e36b37/32.png) [@shokarta](https://discourse.cmake.org/u/shokarta)
#### Post date: [June 24, 2025, 2:32pm UTC](https://discourse.cmake.org/t/openssl-ios-build-fails-on-bunch-of-undefined-symbols/14273/2 "2025-06-24T14:32:48Z")

</div>

No idea how, but libcrypto file was for different platform, therefore excluded from include process adn this is the reason for these errors
