Linking against Openssl 1.1.2-dev Libs
- 
@Opa114 said in Linking against Openssl 1.1.2-dev Libs: -llibssl.dll Afaik you can't link directly against a dll but need an import lib. There must be a 'libssl.a' somehwere around which you have to link to with '-lssl'. The same goes for libcrypto.dll @Christian-Ehrlicher 
 sorry my mistake - i copied some old stuff. i removed the *.dll ending.
 Inside the folder: L$$PWD/../openssl/openssl/ there is a licrypto.a and libcrypto.dll.a, same for the ssl lib.
- 
@Opa114 said in Linking against Openssl 1.1.2-dev Libs: -llibssl.dll Afaik you can't link directly against a dll but need an import lib. There must be a 'libssl.a' somehwere around which you have to link to with '-lssl'. The same goes for libcrypto.dll Hi @Opa114, Just to add to @Christian-Ehrlicher, There must be a 'libssl.a' somehwere around Or, depending on compiler, its named libssl.lib. So the linker call should look like this: 
 win32: LIBS += -L$$PWD/../openssl/openssl/ -lcrypto -lsslAlso, make sure OpenSSL was build with the same compiler you are using for your Qt project. Regards 
- 
Hi @Opa114, Just to add to @Christian-Ehrlicher, There must be a 'libssl.a' somehwere around Or, depending on compiler, its named libssl.lib. So the linker call should look like this: 
 win32: LIBS += -L$$PWD/../openssl/openssl/ -lcrypto -lsslAlso, make sure OpenSSL was build with the same compiler you are using for your Qt project. Regards @aha_1980 said in Linking against Openssl 1.1.2-dev Libs: Hi @Opa114, Just to add to @Christian-Ehrlicher, There must be a 'libssl.a' somehwere around Or, depending on compiler, its named libssl.lib. So the linker call should look like this: 
 win32: LIBS += -L$$PWD/../openssl/openssl/ -lcrypto -lsslAlso, make sure OpenSSL was build with the same compiler you are using for your Qt project. Regards when i try it with -lcrypto and -lssl then i got this error: skipping incompatible C:\Users\Matth\Desktop\openssl\openssl/libcrypto.a when searching for -lcrypto skipping incompatible C:\Users\Matth\Desktop\openssl\openssl/libcrypto.dll.a when searching for -lcrypto cannot find -lcryptosame for the ssl library. 
- 
@aha_1980 said in Linking against Openssl 1.1.2-dev Libs: Hi @Opa114, Just to add to @Christian-Ehrlicher, There must be a 'libssl.a' somehwere around Or, depending on compiler, its named libssl.lib. So the linker call should look like this: 
 win32: LIBS += -L$$PWD/../openssl/openssl/ -lcrypto -lsslAlso, make sure OpenSSL was build with the same compiler you are using for your Qt project. Regards when i try it with -lcrypto and -lssl then i got this error: skipping incompatible C:\Users\Matth\Desktop\openssl\openssl/libcrypto.a when searching for -lcrypto skipping incompatible C:\Users\Matth\Desktop\openssl\openssl/libcrypto.dll.a when searching for -lcrypto cannot find -lcryptosame for the ssl library. @Opa114 said in Linking against Openssl 1.1.2-dev Libs: skipping incompatible That is already a hint :) Again: - which compiler is used for OpenSSL and for your project?
- are both 32bit resp. 64bit?
 Regards 
- 
@Opa114 said in Linking against Openssl 1.1.2-dev Libs: skipping incompatible That is already a hint :) Again: - which compiler is used for OpenSSL and for your project?
- are both 32bit resp. 64bit?
 Regards @aha_1980 
 For OpenSSL i used MinGW (this way and built it under Ubuntu: ./Configure mingw --cross-compile-prefix=i686-w64-mingw32- - prefix=/mnt/c/Users/Matth/Desktop/openssl/BUILD)And for my Project i used MinGW 64 (qmake: qmake.exe test.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" and Make: mingw32-make.exe -j4 in C:\Users\Matth\Desktop\build-test-Desktop_Qt_5_12_0_MinGW_64_bit-Debug) But both should be 32bit builds i think. 
- 
@aha_1980 
 For OpenSSL i used MinGW (this way and built it under Ubuntu: ./Configure mingw --cross-compile-prefix=i686-w64-mingw32- - prefix=/mnt/c/Users/Matth/Desktop/openssl/BUILD)And for my Project i used MinGW 64 (qmake: qmake.exe test.pro -spec win32-g++ "CONFIG+=debug" "CONFIG+=qml_debug" and Make: mingw32-make.exe -j4 in C:\Users\Matth\Desktop\build-test-Desktop_Qt_5_12_0_MinGW_64_bit-Debug) But both should be 32bit builds i think. @Opa114 said in Linking against Openssl 1.1.2-dev Libs: i686-w64-mingw32 Are you sure this means 32 bit? Edit: at least MinGW 64 is not 32bit ;) Edit2: can you build OpenSSL on Windows with the MinGW64 compiler? Should avoid all possible incompatibilities :) 
- 
@Opa114 said in Linking against Openssl 1.1.2-dev Libs: i686-w64-mingw32 Are you sure this means 32 bit? Edit: at least MinGW 64 is not 32bit ;) Edit2: can you build OpenSSL on Windows with the MinGW64 compiler? Should avoid all possible incompatibilities :) 
- 
@aha_1980 said in Linking against Openssl 1.1.2-dev Libs: Edit2: can you build OpenSSL on Windows with the MinGW64 compiler? Should avoid all possible incompatibilities :) i could try it 
- 
@Opa114 
 instead of building openssl under windows i run it again under ubuntu and did a cross compile but now with minGW 64bit which creates a 64-bit dll. With these it works. but should a 64bit application able to use 32bit dlls? Or i am wrong?@Opa114 said in Linking against Openssl 1.1.2-dev Libs: But should a 64bit application able to use 32bit dlls? Or i am wrong? Sorry, but yes you are. You cannot mix these. Regards 
- 
@Opa114 said in Linking against Openssl 1.1.2-dev Libs: But should a 64bit application able to use 32bit dlls? Or i am wrong? Sorry, but yes you are. You cannot mix these. Regards @aha_1980 said in Linking against Openssl 1.1.2-dev Libs: @Opa114 said in Linking against Openssl 1.1.2-dev Libs: But should a 64bit application able to use 32bit dlls? Or i am wrong? Sorry, but yes you are. You cannot mix these. Regards okay thanks for clarification. So it was my mistake because i thought i can mix it. I know the other way would not work. 
- 
@aha_1980 said in Linking against Openssl 1.1.2-dev Libs: @Opa114 said in Linking against Openssl 1.1.2-dev Libs: But should a 64bit application able to use 32bit dlls? Or i am wrong? Sorry, but yes you are. You cannot mix these. Regards okay thanks for clarification. So it was my mistake because i thought i can mix it. I know the other way would not work. 
 

