我正在尝试在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
我看到有人提到进入Makefile并在变量LDFLAGS中添加"-L /lib64 -l pthread",但是如何做到这一点呢?我对Linux完全陌生 =X