无法将mbedtls添加到项目

时间:2019-02-18 11:27:17

标签: c cmake mbedtls

试图将mbedtls添加到我的项目中,我使用apt-get install安装libmbedtls-dev 这些进口不正确吗?适用于Ubuntu 16.04。在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)

获取Unbuntu 16错误

  

/ usr / bin / ld:找不到-lmbedtls

1 个答案:

答案 0 :(得分:2)

分两个步骤:

  1. IN with ANY(%s), 显示您的系统上有什么可能性。
  2. EnviromentalList = [59, 66, 67, 79, 144, 275, 276, 3096, 3097, 356, 376, 509, 548, 589, 871, 872, 888, 889, 890, 891, 901, 919, 960, 998, 221, 223, 224, 225, 226] cur.execute("SELECT event_id, event_time FROM availabilitycalculation.machine_events WHERE event_id IN %s ;", (EnviromentalList,)) ErrorList = cur.fetchall() , 更改为系统上的版本。