我正在尝试在我的项目中包含wxWidgets库。 我正在研究Ubuntu 16.04。您可以从存储库中获取wxWidgets(已编译),并通过修改cmake文件(包含在CLion中)来包含它。这样做很好。
但是,我需要修改源代码,这意味着我必须自己编译库。 我按照这个文件中的说明操作: https://github.com/wxWidgets/wxWidgets/blob/v3.1.0/docs/gtk/install.txt
现在Cmake无法找到该库。 可能缺少什么?
编辑:
CMake关于wxWidgets的部分:
find_package(wxWidgets 3.1.0 COMPONENTS core base media REQUIRED)
include(${wxWidgets_USE_FILE})
target_link_libraries(projectName ${wxWidgets_LIBRARIES})
错误:
CMake Error at /home/usrName/Clion/clion-2017.2/bin/cmake/share/cmake-
3.8/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find wxWidgets: Found unsuitable version "3.0.2", but required is
at least "3.1.0" (found
-L/usr/lib/x86_64-linux-gnu;-pthread;;;-lwx_gtk2u_core-3.0;-lwx_baseu-3.0;-
lwx_gtk2u_media-3.0)
Call Stack (most recent call first):
/home/usrName/Clion/clion-2017.2/bin/cmake/share/cmake-
3.8/Modules/FindPackageHandleStandardArgs.cmake:375 (_FPHSA_FAILURE_MESSAGE)
/home/usrName/Clion/clion-2017.2/bin/cmake/share/cmake-
3.8/Modules/FindwxWidgets.cmake:931 (find_package_handle_standard_args)
CMakeLists.txt:18 (find_package)