<div dir="ltr"><a href="https://stackoverflow.com/questions/6429494/undefined-symbols-for-architecture-armv7">https://stackoverflow.com/questions/6429494/undefined-symbols-for-architecture-armv7</a><div><br></div><div>Look at common cause 3 in the first answer. These are the undefined symbols:</div><div><br></div><div>"_ENGINE_load_builtin_engines", referenced from:<br>         _libssh2_init in global.c.o<br>         __libssh2_init_if_needed in global.c.o<br>     "_ENGINE_register_all_complete", referenced from:<br>         _libssh2_init in global.c.o<br>         __libssh2_init_if_needed in global.c.o</div><div><br></div><div>presumably you didn't recompile them for iOS.<br><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Teja Prabhu</div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 9, 2019 at 12:11 AM <a href="mailto:rollastre@gmail.com">rollastre@gmail.com</a> <<a href="mailto:rollastre@gmail.com">rollastre@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello.<br>
<br>
I have built libssh2 with openssl in windows (MVC 2017), linux (GCC >6), <br>
mac (clang 8 - 10), android (NDK19 / API 21-24 / clang) successfully. <br>
Now I am stuck trying to build it for iOS. The error I get is about an <br>
undefined symbol as folows<br>
<br>
ld: warning: -headerpad_max_install_names is ignored when used with <br>
-bitcode_bundle (Xcode setting ENABLE_BITCODE=YES)<br>
undefined symbols for architecture armv7:<br>
     "_ENGINE_load_builtin_engines", referenced from:<br>
         _libssh2_init in global.c.o<br>
         __libssh2_init_if_needed in global.c.o<br>
     "_ENGINE_register_all_complete", referenced from:<br>
         _libssh2_init in global.c.o<br>
         __libssh2_init_if_needed in global.c.o<br>
ld: symbol(s) not found for architecture armv7<br>
clang: error: linker command failed with exit code 1 (use -v to see <br>
invocation)<br>
<br>
 From what I understand, the problem is that the static lib is not <br>
including a symbol?<br>
<br>
I am using XCode 10.2.1 and the command I used to build OpenSSL is<br>
<br>
./Configure iphoneos-cross <br>
-lsysroot/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk <br>
-mios-version-min=10.0 -fembed-bitcode -O3 <br>
--sysroot=/Application/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk <br>
-fPIC --with-zlib-include=/Users/roll/sdks/zlib/include <br>
--with-zlib-lib=/Users/roll/sdks/zlib/lib<br>
<br>
the build process ends without error and a libcrypto.a and libssl.a <br>
files are created.<br>
<br>
Can anybody point me what am I doing wrong or misunderstanding?<br>
<br>
Thanks in advance.<br>
<br>
</blockquote></div>