0
雖然在我的代碼實現的CMake我得到一個食人魔錯誤:食人魔錯誤在CMake的
/usr/bin/ld: cannot find -lOGRE
我的CMakeLists.txt文件看起來像:
#Specify the version being used aswell as the language
cmake_minimum_required(VERSION 2.6)
#Name your project here
project(eCAD)
#sets cmake to run moc when needed
set(CMAKE_AUTOMOC ON)
#find requirements of this projects
find_package(Qt5Widgets)
find_package(Qt5Core)
find_package(OGRE)
find_package(OIS)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
#Sends the -std=c++11 flag to the gcc compiler
add_definitions(-std=c++11)
qt5_wrap_ui(Cmake_form_hdr resources/ui/mainwindow.ui)
#This tells CMake to main.cpp and name it eCAD
add_executable(eCAD main.cpp ${Cmake_form_hdr})
#include the subdirectory containing our libs
add_subdirectory (gui)
include_directories(gui)
#link_libraries
target_link_libraries(eCAD Qt5::Widgets Qt5::Core OGRE OIS)
我是新來這個。請幫我解決問題
即使添加此錯誤仍然相同。 – user3859872 2014-10-07 08:06:41
什麼給你'MESSAGE($ {OGRE_LIBRARIES})'? – Peter 2014-10-07 08:13:06
使用該錯誤:使用錯誤的參數號碼調用 – user3859872 2014-10-07 08:27:05