未定义对符号'pthread_key_delete @@ GLIBC_2.2.5的引用 [英] undefined reference to symbol 'pthread_key_delete@@GLIBC_2.2.5

查看:1289
本文介绍了未定义对符号'pthread_key_delete @@ GLIBC_2.2.5的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Ubuntu中制作文件,当我制作时我不断出现此错误:

I'm trying to make a file in Ubuntu and when i make i keep getting this error:

/usr/bin/ld: ../../gtest-1.7.0/libgtest.a(gtest-all.cc.o): undefined reference to symbol     'pthread_key_delete@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [src/tests/run_tests] Error 1
make[1]: *** [src/tests/CMakeFiles/run_tests.dir/all] Error 2
make: *** [all] Error 2

我看到有人提到要进入Makefile并将'-L/lib64 -l pthread'添加到变量LDFLAGS,但是您该怎么做?完全是linux的新手,在这里= X

I saw someone mentioning to go into Makefile and adding '-L /lib64 -l pthread' to the variable LDFLAGS but how do you do that? Totally new to linux here =X

推荐答案

上述链接问题是通过添加

The above linking problem is solved by adding

-lpthread -lm to CMakeLists.txt (target link libraries for luxrender);
TARGET_LINK_LIBRARIES(... -lpthread -lm)

这篇关于未定义对符号'pthread_key_delete @@ GLIBC_2.2.5的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆