linux 如何从CodeLite的G++ Linker命令中删除库?找不到它们

flseospp  于 2023-03-07  发布在  Linux
关注(0)|答案(1)|浏览(192)

我试图编译我的wxWidgets应用程序,但它不允许我编译,因为它找不到这些库。我搜索了这些库,它们确实不在我的计算机上。那么我怎样才能把它们从链接器中去掉呢?在活动项目设置中看不到这些库,也不确定这些库是在哪里指定的(我看了所有的“链接器”设置,然后一些)。有点烦人

/usr/bin/make -j2 -e -f  Makefile
----------Building project:[ LearnFrench - Debug ]----------
make[1]: Entering directory '/home/oem/Documents/CodeliteProjects/LearnFrench'
/usr/bin/g++ -o ../../Documents/build-Debug/bin/LearnFrench @../../Documents/build-Debug/__/CodeliteProjects/LearnFrench/ObjectsList.txt -L/usr/lib/codelite -L/usr/local/lib/  -l wx_gtk3u_stc-3.2.so.0 -l wx_gtk3u_html-3.2 -l wx_gtk3u_aui-3.2.so.0 -l wx_gtk3u_adv-3.2 -l wx_gtk3u_stc-3.2.so.0.2.1 -l wx_gtk3u_propgrid-3.2.so.0.2.1 -l wx_gtk3u_gl-3.2 -l wx_gtk3u_html-3.2.so.0 -l wx_gtk3u_adv-3.2.so.0 -l wx_gtk3u_aui-3.2.so.0.2.1 -l wx_gtk3u_core-3.2.so.0.2.1 -l wx_gtk3u_gl-3.2.so.0 -l wx_baseu_net-3.2.so.0 -l wx_gtk3u_xrc-3.2.so.0 -l wx_gtk3u_ribbon-3.2 -l wx_gtk3u_richtext-3.2.so.0.2.1 -l wx_gtk3u_core-3.2 -l wx_gtk3u_core-3.2.so.0 -l wx_gtk3u_propgrid-3.2 -l wx_gtk3u_qa-3.2 -l wx_gtk3u_qa-3.2.so.0 -l wx_gtk3u_qa-3.2.so.0.2.1 -l wx_gtk3u_xrc-3.2 -l wx_gtk3u_propgrid-3.2.so.0 -l wx_baseu-3.2.so.0.2.1 -l wx_gtk3u_gl-3.2.so.0.2.1 -l wx_gtk3u_richtext-3.2 -l wx_gtk3u_adv-3.2.so.0.2.1 -l wx_baseu_xml-3.2.so.0.2.1 -l wx_gtk3u_xrc-3.2.so.0.2.1 -l wx_baseu_xml-3.2 -l wx_baseu-3.2.so.0 -l wx_gtk3u_ribbon-3.2.so.0.2.1 -l wx_baseu_net-3.2 -l wx_gtk3u_html-3.2.so.0.2.1 -l wx_baseu-3.2 -l wx_gtk3u_aui-3.2 -l wx_baseu_net-3.2.so.0.2.1 -l wx_gtk3u_richtext-3.2.so.0 -l wx_gtk3u_stc-3.2 -l wx_baseu_xml-3.2.so.0 -l wx_gtk3u_ribbon-3.2.so.0
/usr/bin/ld: cannot find -lwx_gtk3u_stc-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_aui-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_stc-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_propgrid-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_html-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_adv-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_aui-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_core-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_gl-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_baseu_net-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_xrc-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_richtext-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_core-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_qa-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_qa-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_propgrid-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_baseu-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_gl-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_adv-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_baseu_xml-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_xrc-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_baseu-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_ribbon-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_html-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_baseu_net-3.2.so.0.2.1: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_richtext-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_baseu_xml-3.2.so.0: No such file or directory
/usr/bin/ld: cannot find -lwx_gtk3u_ribbon-3.2.so.0: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [LearnFrench.mk:82: ../../Documents/build-Debug/bin/LearnFrench] Error 1
make[1]: Leaving directory '/home/oem/Documents/CodeliteProjects/LearnFrench'
make: *** [Makefile:5: All] Error 2
=== build completed successfully (0 errors, 0 warnings) ===

我希望在项目设置中找到这些库,但在任何地方都找不到。

soat7uwm

soat7uwm1#

我想,当我从源代码重新编译和安装库时,库名称一定在最新的源代码中被重命名了,从something.so重命名为libsomething.so。
所以我在lib文件夹中创建了一个软链接,连接真实的的库和那些因为不存在而找不到的库(使用它们的原始名称)。

sudo ln -s libwx_baseu-3.2.so.0.2.1 wx_baseu-3.2.so.0.2.1

    sudo ln -s libwx_baseu-3.2.so.0.2.1 wx_baseu-3.2.so.0

    sudo ln -s libwx_baseu-3.2.so.0.2.1 wx_baseu-3.2

现在代码可以正常编译和运行了。

相关问题