无法找到“/include/wx/version.h”

无法找到“/include/wx/version.h”

我尝试得到零膜工作室跑步。不幸的是,我缺少wxLua。因此,我执行了以下步骤:

sudo apt install libwxgtk3.0-dev cmake
wget -c https://github.com/pkulchenko/wxlua/archive/refs/tags/v3.1.0.0.tar.gz
tar xfvz v3.1.0.0.tar.gz 
cd wxlua-3.1.0.0/

$ mkdir build-dir
$ cd build-dir/
$ cmake ..
-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- * ---------------------------------------------------------------------------
-- * CMake command line options and tips specific to this project 
-- * 
-- * In the CMake GUI you can set values and press configure a few times 
-- * and until there are no more red items, then press generate.
-- * 
-- * Usage: cmake -D[OPTION_NAME]=[OPTION_VALUE] /path/to/CMakeLists.txt/
-- * ---------------------------------------------------------------------------
-- * -DHELP=TRUE 
-- *   Show this help message and exit, no files will be generated.
-- * -DCMAKE_BUILD_TYPE=[Debug, Release, RelWithDebInfo, MinSizeRel] : (Default Debug)
-- *   Makefiles : You must set the build type to Debug, Release...
-- *   MSVC GUI  : No need to set this since you can choose it in the GUI.
-- * -DBUILD_SHARED_LIBS=[TRUE, FALSE] : (Default static in MSW, shared in Linux)
-- *   Build shared (.DLL or .so) or static (.lib or .a) libraries.
-- * ---------------------------------------------------------------------------
--  
-- * No build type was specified, using default 'Debug'
--  
-- *****************************************************************************
-- * BUILD TYPE:        Debug
-- * BUILD_SHARED_LIBS: TRUE
-- *****************************************************************************
-- * System is 32-bit FALSE, is 64-bit TRUE
-- *****************************************************************************
-- * CMAKE_SOURCE_DIR = /home/mtlorenc/wxlua-3.1.0.0/wxLua
-- * CMAKE_BINARY_DIR = /home/mtlorenc/wxlua-3.1.0.0/wxLua/build-dir
-- *****************************************************************************
--  
-- * ---------------------------------------------------------------------------
-- * wxWidgets library settings :
-- * 
-- * Note that ONLY an all shared (DLL) or all static build is supported.
-- *   I.E. If you choose shared you must link to shared wxWidgets libs.
-- *   Set -DBUILD_SHARED_LIBS=[TRUE, FALSE] to control shared/static lib.
-- * 
-- * Finding wxWidgets for MSW and MSVC
-- * -DwxWidgets_ROOT_DIR=[path] : (e.g. /path/to/wxWidgets/)
-- *   Path to the root of the wxWidgets build, must at least set this.
-- * -DwxWidgets_LIB_DIR=[path] : (e.g. /path/to/wxWidgets/lib/vc_lib/)
-- *   Path to the wxWidgets lib dir also set this if libs can't be found.
-- * -DwxWidgets_CONFIGURATION=[configuration] : 
-- *   Set wxWidgets configuration; e.g. msw, mswu, mswunivu...
-- *   Where 'u' = unicode and 'd' = debug.
-- *   MSVC GUI : You need only choose msw, mswu, mswuniv, mswunivu since 
-- *              release or debug mode is chosen in the GUI.
-- * -DwxWidgets_COMPONENTS=[...stc;html;adv;core;base or mono] : 
-- *   For non-monolithic builds choose the wxWidgets libs to link to.
-- *    xrc;xml;gl;net;media;propgrid;richtext;aui;stc;html;adv;core;base
-- *   For monolithic builds choose mono and the contribs libs.
-- *    stc;mono
-- *   The extra decorations, e.g. wxmsw28ud_adv.lib, will be searched for.
-- *   Libs that cannot be found will be printed below, please fix/remove
-- *   them to be able to build this project.
-- *   You will get compilation/linker errors if wxWidgets is not found.
-- * 
-- * Finding wxWidgets for GCC and Unix type systems
-- * -DwxWidgets_CONFIG_EXECUTABLE=[path/to/wx-config] : 
-- *   Specify path to wx-config script for GCC and Unix type builds
-- * ---------------------------------------------------------------------------
--  
-- * WARNING : Unable to find '/include/wx/version.h'
-- *           Please set wxWidgets_CONFIG_EXECUTABLE to point to wx-config script.
-- * Note: wxWidgets libs; Removing 'propgrid' lib from wxWidgets_COMPONENTS since it didn't exit in wx < 2.9
-- * Using these wxWidgets components: gl;xrc;xml;net;media;richtext;aui;stc;html;adv;core;base
-- Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES) 
-- * 
CMake Warning at build/CMakewxAppLib.cmake:325 (message):
  * WARNING: Could not find wxWidgets! Please see help above.
Call Stack (most recent call first):
  CMakeLists.txt:58 (FIND_WXWIDGETS)


-- * - wxWidgets_VERSION           =  = ..
-- * - wxWidgets_COMPONENTS        = gl;xrc;xml;net;media;richtext;aui;stc;html;adv;core;base
-- * - wxWidgets_INCLUDE_DIRS      = /usr/lib/aarch64-linux-gnu/wx/include/gtk2-unicode-3.0;/usr/include/wx-3.0
-- * - wxWidgets_LIBRARY_DIRS      = 
-- * - wxWidgets_LIBRARIES         = 
-- * - wxWidgets_CXX_FLAGS         = -pthread
-- * - wxWidgets_DEFINITIONS       = _FILE_OFFSET_BITS=64;__WXGTK__
-- * - wxWidgets_DEFINITIONS_DEBUG = 
-- * - wxWidgets_PORTNAME          = 
-- * - wxWidgets_UNIVNAME          = 
-- * - wxWidgets_UNICODEFLAG       = 
-- * - wxWidgets_DEBUGFLAG         = 
 WARNING: Unable to find requested wxWidgets component : gl
 WARNING: Unable to find requested wxWidgets component : xrc
 WARNING: Unable to find requested wxWidgets component : xml
 WARNING: Unable to find requested wxWidgets component : net
 WARNING: Unable to find requested wxWidgets component : media
 WARNING: Unable to find requested wxWidgets component : richtext
 WARNING: Unable to find requested wxWidgets component : aui
 WARNING: Unable to find requested wxWidgets component : stc
 WARNING: Unable to find requested wxWidgets component : html
 WARNING: Unable to find requested wxWidgets component : adv
 WARNING: Unable to find requested wxWidgets component : core
 WARNING: Unable to find requested wxWidgets component : base
-- * 
wxWidgets requested but not found.
-- * WARNING: Specified wxLuaBinding lib 'webview' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'propgrid' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * wxLua using built-in Lua 5.1 library
-- * WARNING: cppcheck NOT found, NOT generating ADD_CPPCHECK_TEST() tests
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- * WARNING: Doxygen NOT found, wxLua_doxygen target will not be generated.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mtlorenc/wxlua-3.1.0.0/wxLua/build-dir

更新

$ sudo apt install libwxgtk3.0-dev cmake libwxgtk-media3.0-gtk3-dev libwxgtk-media3.0-dev ncurses-base readline-common
$ cmake -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config -DCMAKE_BUILD_TYPE=Release ..
-- * ---------------------------------------------------------------------------
-- * CMake command line options and tips specific to this project 
-- * 
-- * In the CMake GUI you can set values and press configure a few times 
-- * and until there are no more red items, then press generate.
-- * 
-- * Usage: cmake -D[OPTION_NAME]=[OPTION_VALUE] /path/to/CMakeLists.txt/
-- * ---------------------------------------------------------------------------
-- * -DHELP=TRUE 
-- *   Show this help message and exit, no files will be generated.
-- * -DCMAKE_BUILD_TYPE=[Debug, Release, RelWithDebInfo, MinSizeRel] : (Default Debug)
-- *   Makefiles : You must set the build type to Debug, Release...
-- *   MSVC GUI  : No need to set this since you can choose it in the GUI.
-- * -DBUILD_SHARED_LIBS=[TRUE, FALSE] : (Default static in MSW, shared in Linux)
-- *   Build shared (.DLL or .so) or static (.lib or .a) libraries.
-- * ---------------------------------------------------------------------------
--  
--  
-- *****************************************************************************
-- * BUILD TYPE:        Release
-- * BUILD_SHARED_LIBS: TRUE
-- *****************************************************************************
-- * System is 32-bit FALSE, is 64-bit TRUE
-- *****************************************************************************
-- * CMAKE_SOURCE_DIR = /home/mtlorenc/wxlua-3.1.0.0/wxLua
-- * CMAKE_BINARY_DIR = /home/mtlorenc/wxlua-3.1.0.0/wxLua/build-dir
-- *****************************************************************************
--  
-- * ---------------------------------------------------------------------------
-- * wxWidgets library settings :
-- * 
-- * Note that ONLY an all shared (DLL) or all static build is supported.
-- *   I.E. If you choose shared you must link to shared wxWidgets libs.
-- *   Set -DBUILD_SHARED_LIBS=[TRUE, FALSE] to control shared/static lib.
-- * 
-- * Finding wxWidgets for MSW and MSVC
-- * -DwxWidgets_ROOT_DIR=[path] : (e.g. /path/to/wxWidgets/)
-- *   Path to the root of the wxWidgets build, must at least set this.
-- * -DwxWidgets_LIB_DIR=[path] : (e.g. /path/to/wxWidgets/lib/vc_lib/)
-- *   Path to the wxWidgets lib dir also set this if libs can't be found.
-- * -DwxWidgets_CONFIGURATION=[configuration] : 
-- *   Set wxWidgets configuration; e.g. msw, mswu, mswunivu...
-- *   Where 'u' = unicode and 'd' = debug.
-- *   MSVC GUI : You need only choose msw, mswu, mswuniv, mswunivu since 
-- *              release or debug mode is chosen in the GUI.
-- * -DwxWidgets_COMPONENTS=[...stc;html;adv;core;base or mono] : 
-- *   For non-monolithic builds choose the wxWidgets libs to link to.
-- *    xrc;xml;gl;net;media;propgrid;richtext;aui;stc;html;adv;core;base
-- *   For monolithic builds choose mono and the contribs libs.
-- *    stc;mono
-- *   The extra decorations, e.g. wxmsw28ud_adv.lib, will be searched for.
-- *   Libs that cannot be found will be printed below, please fix/remove
-- *   them to be able to build this project.
-- *   You will get compilation/linker errors if wxWidgets is not found.
-- * 
-- * Finding wxWidgets for GCC and Unix type systems
-- * -DwxWidgets_CONFIG_EXECUTABLE=[path/to/wx-config] : 
-- *   Specify path to wx-config script for GCC and Unix type builds
-- * ---------------------------------------------------------------------------
--  
-- * Using these wxWidgets components: gl;xrc;xml;net;media;richtext;aui;stc;html;adv;core;base
-- Found wxWidgets: -L/usr/lib/aarch64-linux-gnu;-pthread;;;-lwx_gtk2u_gl-3.0;-lwx_gtk2u_xrc-3.0;-lwx_baseu_xml-3.0;-lwx_baseu_net-3.0;-lwx_gtk2u_media-3.0;-lwx_gtk2u_richtext-3.0;-lwx_gtk2u_aui-3.0;-lwx_gtk2u_stc-3.0;-lwx_gtk2u_html-3.0;-lwx_gtk2u_adv-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu-3.0 (found version "3.0.4") 
-- * 
-- * Found wxWidgets :
-- * - wxWidgets_VERSION           = 3.0.4 = 3.0.4
-- * - wxWidgets_COMPONENTS        = gl;xrc;xml;net;media;richtext;aui;stc;html;adv;core;base
-- * - wxWidgets_INCLUDE_DIRS      = /usr/lib/aarch64-linux-gnu/wx/include/gtk2-unicode-3.0;/usr/include/wx-3.0
-- * - wxWidgets_LIBRARY_DIRS      = 
-- * - wxWidgets_LIBRARIES         = -L/usr/lib/aarch64-linux-gnu;-pthread;;;-lwx_gtk2u_gl-3.0;-lwx_gtk2u_xrc-3.0;-lwx_baseu_xml-3.0;-lwx_baseu_net-3.0;-lwx_gtk2u_media-3.0;-lwx_gtk2u_richtext-3.0;-lwx_gtk2u_aui-3.0;-lwx_gtk2u_stc-3.0;-lwx_gtk2u_html-3.0;-lwx_gtk2u_adv-3.0;-lwx_gtk2u_core-3.0;-lwx_baseu-3.0
-- * - wxWidgets_CXX_FLAGS         = -pthread
-- * - wxWidgets_DEFINITIONS       = _FILE_OFFSET_BITS=64;__WXGTK__
-- * - wxWidgets_DEFINITIONS_DEBUG = 
-- * - wxWidgets_PORTNAME          = gtk2
-- * - wxWidgets_UNIVNAME          = 
-- * - wxWidgets_UNICODEFLAG       = u
-- * - wxWidgets_DEBUGFLAG         = 
-- * 
-- * WARNING: Specified wxLuaBinding lib 'webview' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * WARNING: Specified wxLuaBinding lib 'propgrid' in variable wxLuaBind_COMPONENTS is missing from wxWidgets_COMPONENTS so it will not be compiled.
-- * wxLua using built-in Lua 5.1 library
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- * WARNING: Doxygen NOT found, wxLua_doxygen target will not be generated.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mtlorenc/wxlua-3.1.0.0/wxLua/build-dir




[ 93%] Linking CXX shared library ../../lib/Release/libwx.so
[ 93%] Built target wxLuaModule
Scanning dependencies of target wxLua_app
[ 94%] Building CXX object apps/wxlua/CMakeFiles/wxLua_app.dir/wxlua.cpp.o
[ 95%] Linking CXX executable ../../bin/Release/wxLua
/usr/bin/ld: ../../lib/Release/libwxlua_bind-wx30gtk2u-3.1.0.0.so: undefined reference to `wxPluralFormsCalculatorPtr::~wxPluralFormsCalculatorPtr()'
collect2: error: ld returned 1 exit status
make[2]: *** [apps/wxlua/CMakeFiles/wxLua_app.dir/build.make:89: bin/Release/wxLua] Error 1
make[1]: *** [CMakeFiles/Makefile2:565: apps/wxlua/CMakeFiles/wxLua_app.dir/all] Error 2
make: *** [Makefile:152: all] Error 2

我错过了什么?

先感谢您,

答案1

您需要告诉构建在哪里可以找到wx-config

cmake -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config -DCMAKE_BUILD_TYPE=Release ../wxLua

您可能还需要其他 wx 软件包,例如libwxgtk-media3.0-gtk3-dev(或libwxgtk-media3.0-dev在旧版本中),并考虑到您的更新,libreadline-dev以及libncurses-dev.

相关内容