简体   繁体   English

未定义的符号引用,命令行中缺少 DSO

[英]Undefined reference to symbol, DSO missing from command line

I'm trying to compile the Lotech framework under Debian Jessie, but I'm can't seem to get past a specific point in compilation.我正在尝试在 Debian Jessie 下编译Lotech 框架,但我似乎无法超越编译中的特定点。 I've searched the error messages that come up, and almost all of them seem to be resolved by installing or linking a missing dependency, but I can't figure out what that dependency is in this situation.我搜索了出现的错误消息,几乎所有错误消息似乎都可以通过安装或链接缺少的依赖项来解决,但我无法弄清楚在这种情况下该依赖项是什么。

cp buildtmp.linux/liblt.a linux/
cd clients/glfw/ && make LTCFLAGS="-O3 -DNDEBUG -DLTLINUX " && cp ltclient ../../
make[1]: Entering directory `/home/jake/Desktop/copy-lotech-master/clients/glfw'
g++ -O3 -DNDEBUG -DLTLINUX  -I../../linux/include -L../../linux ltclient.cpp \
        -o ltclient -static-libstdc++ -static-libgcc ../../linux/liblt.a ../../linux/libpng.a ../../linux/libz.a ../../linux/liblua.a ../../linux/libvorbis.a ../../linux/libbox2d.a ../../linux/libglfw.a ../../linux/libGLEW.a ../../linux/libopenal.a ../../linux/libcurl.a -lX11 -lGL wrap_memcpy.o -Wl,--wrap=memcpy
/usr/bin/ld: ../../linux/libopenal.a(helpers.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[1]: *** [ltclient] Error 1
make[1]: Leaving directory `/home/jake/Desktop/copy-lotech-master/clients/glfw'
make: *** [ltclient] Error 2

For me this does the trick 对我来说,这就是窍门

set (CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_LINK_EXECUTABLE} -ldl") 设置(CMAKE_CXX_LINK_EXECUTABLE“ $ {CMAKE_CXX_LINK_EXECUTABLE} -ldl”)

Useful links 有用的链接

Link1 链接1

Link2 LINK2

Link3 <- Cmake how to find libraries Link3 <-Cmake如何查找库

Link4 链路4

Link5 Link5

DSO means Dynamic Shared Object. DSO 表示动态共享 Object。 Add the option "-lpthread" works for me.添加选项“-lpthread”对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未定义的符号引用 '<symbol> '...添加符号时出错:命令行中缺少 DSO(使用 CMake)</symbol> - Undefined Reference to Symbol '<Symbol>' ... Error Adding Symbols: DSO Missing From Command Line (With CMake) GLEW + cmake链接失败“未定义引用符号glDrawElements”+“DSO从命令行中丢失” - GLEW + cmake linking fails “undefined reference to symbol glDrawElements” + “DSO missing from command line” 错误:cv :: VideoCapture :: ~~ VideoCapture()的未定义引用符号,命令行中缺少DSO - Error: Undefined reference symbol to cv::VideoCapture::~VideoCapture(), DSO missing from command line libtorch c++ 未定义参考:命令行中缺少 DSO - libtorch c++ undefined reference: DSO missing from command line 在shm_open上的C ++ Boost库未定义参考:命令行缺少DSO - C++ Boost Library Undefined Reference On shm_open: DSO Missing From Command Line Lib Poco:命令行缺少DSO - Lib Poco: DSO missing from command line 命令行中缺少 DSO(使用 CMake) - DSO missing from command line (With CMake) 编译时命令行中缺少 DSO - DSO missing from command line when compiling 命令行QT中缺少DSO - DSO missing from command line QT libstdc++:命令行中缺少 DSO - libstdc++: DSO missing from command line
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM