小编imo*_*tal的帖子

未定义引用符号'pthread_key_delete @@ GLIBC_2.2.5

我正在尝试在Ubuntu中创建一个文件,当我让我不断收到此错误:

/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
Run Code Online (Sandbox Code Playgroud)

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

linux linker-errors undefined-reference

14
推荐指数
2
解决办法
2万
查看次数

标签 统计

linker-errors ×1

linux ×1

undefined-reference ×1