【问题标题】:Linking boost & mygui 3.2.1 undefined symbol链接 boost & mygui 3.2.1 未定义符号
【发布时间】:2025-12-28 02:05:07
【问题描述】:

我正在尝试在 kubuntu 上安装 myGui 3.2.1。但是,在链接文件时会出现以下问题:

/usr/bin/ld: CMakeFiles/Demo_Colour.dir/DemoKeeper.cpp.o: undefined reference to enter code here/usr/bin/ld: CMakeFiles/Demo_Gui.dir/DemoKeeper.cpp.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libboost_system.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
symbol '_ZN5boost6system15system_categoryEv'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libboost_system.so: error adding symbols: DSO missing from command/usr line
collect2: error: ld returned 1 exit status
/usr/bin/ld: CMakeFiles/Demo_Controllers.dir/DemoKeeper.cpp.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libboost_system.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
/bin/ld: CMakeFiles/Demo_Console.dir/DemoKeeper.cpp.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libboost_system.so: error adding symbols: DSO missing from command line

我想与 boost 链接存在问题,我找到了一些解决方法,但这些解决方案仅适用于 archlinux,对我不起作用。无论如何,我查看了 myGui 的 CMAKE 文件,找不到任何关于 boost...

我将不胜感激任何形式的帮助!

【问题讨论】:

    标签: user-interface boost linker ogre undefined-symbol


    【解决方案1】:

    我查看了 myGui 的 CMAKE 文件,找不到任何关于 boost...

    您显然需要链接到适当的 Boost 库。 This answer 可能会有所帮助。

    【讨论】:

    • 谢谢!我已经尝试过了,但是 CMAKE 出现了问题:Cannot specified link library for target "/usr/lib/x86_64-linux-gnu/libboost_filesystem.so" 这不是由这个项目构建的。
    【解决方案2】:

    此问题已在 git 存储库中修复。 MyGUI 中不使用 Boost,但是当您使用 OgrePlatform 构建 MyGUI 时,OGRE 需要对其标题进行 boost。

    【讨论】: