You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
include_directories(${PROJECT_SOURCE_DIR})
set(CMAKE_PREFIX_PATH D:/Qt/Qt5.9.9/5.9.9/msvc2015/lib/cmake)
set(Qt5Sql_DIR D:/Qt/Qt5.9.9/5.9.9/msvc2015/lib/cmake/Qt5Sql)
set(Qt5Widgets_DIR D:/Qt/Qt5.9.9/5.9.9/msvc2015/lib/cmake/Qt5Widgets)
set(Qt5Multimedia_DIR /D:/Qt/Qt5.9.9/5.9.9/msvc2015/lib/cmake/Qt5Multimedia)
set(Qt5MultimediaWidgets_DIR D:/Qt/Qt5.9.9/5.9.9/msvc2015/lib/cmake/Qt5MultimediaWidgets)
find_package(Qt5 COMPONENTS Multimedia MultimediaWidgets Widgets Sql REQUIRED)
aux_source_directory(. SQLite_DIR)
add_executable(${PROJECT_NAME} ${SQLite_DIR})
target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::Multimedia Qt5::Sql)
I have add Sql in CMakeList, Code compilation can be passed, and error is reported during operation,it have a error that * undefined reference to `__imp__ZN12QSqlDatabaseC1Ev'*,thanks
The text was updated successfully, but these errors were encountered:
CMakelist:
**CMAKE_MINIMUM_REQUIRED(VERSION 3.16)
set(CMAKE_CXX_STANDARD )
project(SQLite)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
include_directories(${PROJECT_SOURCE_DIR})
set(CMAKE_PREFIX_PATH D:/Qt/Qt5.9.9/5.9.9/msvc2015/lib/cmake)
set(Qt5Sql_DIR D:/Qt/Qt5.9.9/5.9.9/msvc2015/lib/cmake/Qt5Sql)
set(Qt5Widgets_DIR D:/Qt/Qt5.9.9/5.9.9/msvc2015/lib/cmake/Qt5Widgets)
set(Qt5Multimedia_DIR /D:/Qt/Qt5.9.9/5.9.9/msvc2015/lib/cmake/Qt5Multimedia)
set(Qt5MultimediaWidgets_DIR D:/Qt/Qt5.9.9/5.9.9/msvc2015/lib/cmake/Qt5MultimediaWidgets)
find_package(Qt5 COMPONENTS Multimedia MultimediaWidgets Widgets Sql REQUIRED)
aux_source_directory(. SQLite_DIR)
add_executable(${PROJECT_NAME} ${SQLite_DIR})
target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::Multimedia Qt5::Sql)
I have add Sql in CMakeList, Code compilation can be passed, and error is reported during operation,it have a error that * undefined reference to `__imp__ZN12QSqlDatabaseC1Ev'*,thanks
The text was updated successfully, but these errors were encountered: