On 2/24/2021 9:40 AM, Nir Azkiel via curl-library wrote:
I got libcurl downloaded and build, I would like to add HTTPS support but I keep getting linkage errors.

I added this flag to libcurl Externalproject_Add
-DCMAKE_USE_OPENSSL=ON

also I added link to ssl like this

set(OPENSSL_USE_STATIC_LIBS TRUE)
find_package(OpenSSL REQUIRED)
target_link_libraries(curl INTERFACE OpenSSL::SSL OpenSSL::Crypto).

I am using libcurl latest release : 7.75

My configure step find the ssl package:
Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.a (found version "1.0.2g")
I keep getting linkage errors like this:
../../libcurl/libcurl_install/lib/libcurl.a(openssl.c.o): In function `ossl_log_tls12_secret': 3703/home/travis/build/Nir-Az/librealsense/build/third-party/libcurl/lib/vtls/openssl.c:270: undefined reference to `SSL_get_session' 3704../../libcurl/libcurl_install/lib/libcurl.a(openssl.c.o): In function `ossl_strerror': 3705/home/travis/build/Nir-Az/librealsense/build/third-party/libcurl/lib/vtls/openssl.c:354: undefined reference to `ERR_error_string_n'


ERR_error_string_n is in libcrypto so I think your project is not including it. Maybe it is the INTERFACE dependency specification? OTOH we are a bit unfamiliar with cmake. Can you give us a minimal sample cmake project that can be used to reproduce?


-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to