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
I compiled it for windows using linux with the README.windows commands
i got three library files, tls.a,ssl.a and crypto.a
but when i tried using them i got the following error message:
/usr/bin/x86_64-w64-mingw32-ld: CMakeFiles/_.dir/objects.a(main.cpp.obj):_/src/main.cpp:5: undefined reference to `SSL_load_error_strings'
/usr/bin/x86_64-w64-mingw32-ld: CMakeFiles/_.dir/objects.a(main.cpp.obj): in function `main':
_/src/main.cpp:6: undefined reference to `SSL_library_init'
but everything works well when compiling with just gcc on linux for linux, the error only occurs when crosscompiling
The text was updated successfully, but these errors were encountered:
Here's a quick working example for you to play with:
$ make install DESTDIR=`pwd`/install > /dev/null
libtool: warning: remember to run 'libtool --finish /usr/local/lib'
libtool: warning: remember to run 'libtool --finish /usr/local/lib'
libtool: warning: remember to run 'libtool --finish /usr/local/lib'
$ cat main.cpp
#include <openssl/ssl.h>
int main(int argc, char const *argv[])
{
printf("SSL_library_init returned %d\n", SSL_library_init());
}
$ x86_64-w64-mingw32-c++ main.cpp -Iinstall/usr/local/include -Linstall/usr/local/lib -lssl -lcrypto -lws2_32 -lbcrypt -static
$ wine ./a.exe
SSL_library_init returned 1
Keep in mind you should install the library somewhere (implied, but not explicitly spelled out in the README) in order to use it, and you'll also need to explicitly link in some support libraries on Windows that are implicit on other platforms. I think the linker script should help you automatically here, but if you're cross-compiling straight from the command line, you're probably not using it.
@RandomInEqualities do you think this needs more clarification in the docs, or is something like this fairly clear when folks are targeting Windows already?
I compiled it for windows using linux with the README.windows commands
i got three library files, tls.a,ssl.a and crypto.a
but when i tried using them i got the following error message:
but everything works well when compiling with just gcc on linux for linux, the error only occurs when crosscompiling
The text was updated successfully, but these errors were encountered: