0

Trying to add mbedtls to my project, I use apt-get install to install libmbedtls-dev are these imports incorrect? for Ubuntu 16.04.works fine on 18.04

file (GLOB C_FILES *.c)
file (GLOB H_FILES "../../../include/thrift/ssl/*.h")
add_library (thrift_tcp_ssl ${THRIFT_LIB_TYPE} ${C_FILES} ${H_FILES})
target_link_libraries (thrift_tcp_ssl PRIVATE thrift -lmbedtls -lmbedx509 -lmbedcrypto)
target_include_directories (thrift_tcp_ssl PRIVATE ../../../include)
install (TARGETS thrift_tcp_ssl LIBRARY DESTINATION lib ARCHIVE DESTINATION lib RUNTIME DESTINATION bin)

get this error for unbuntu 16

/usr/bin/ld: cannot find -lmbedtls

1 Answers1

5

In two steps:

  1. sudo apt-cache search mbedtls, which shows what possiblities you have on your system.
  2. sudo apt install libmbedtls-dev libmbedtls10, change to versions you have on your system.
Duck Dodgers
  • 3,409
  • 8
  • 29
  • 43