wxLua 导致 collect2: error: ld returned 1 退出状态

wxLua 导致 collect2: error: ld returned 1 退出状态

我尝试零脑工作室正在运行。不幸的是,我缺少 wxLua。因此,我执行了以下步骤:

$ sudo apt install libwxgtk3.0-dev cmake libwxgtk-media3.0-gtk3-dev libwxgtk-media3.0-dev ncurses-base readline-common
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 -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

安装ZeroBrane工作室即使在 Ubuntu 18.04.6 LTS 上也很简单,使用以下命令:

cd ~/Downloads
wget -c https://download.zerobrane.com/ZeroBraneStudioEduPack-1.90-linux.sh
chmod +x ZeroBraneStudioEduPack-1.90-linux.sh
sudo ./ZeroBraneStudioEduPack-1.90-linux.sh

相关内容