Disclaimer: This article is a blogger summer hui's original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/shanpenghui/article/details/89741989
Use SQLite in Clion, when the emergence of
undefined reference to `dlopen'
When these errors
should be so modified CMakeList:
cmake_minimum_required(VERSION 3.14)
project(ex_sql)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS -pthread)
add_compile_options(-l sqlite3)
add_executable(ex_sql main.cpp sqlite3.c)
target_link_libraries(ex_sql ${CMAKE_DL_LIBS})