有一个libpthread.so连接Ubuntu上的麻烦

ser*_*rat 6 ubuntu makefile undefined glfw

我从这个网站http://mnbayazit.com/406/bayazit下载了源代码

这个项目有一些依赖:

库:FTGL(用于字体),FreeType2(FTGL需要),GLFW(用于Windows和键盘输入),OpenGL.软件:CMake(如果它不构建)但我遇到了问题.

安装指南看起来像

构建和运行:

cmake .
make
./conv
Run Code Online (Sandbox Code Playgroud)

而我正在努力建立它.

$ cmake .  
Run Code Online (Sandbox Code Playgroud)

很好,但是当我想要的时候

$ make
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

Linking CXX executable conv
/usr/bin/ld: /usr/local/lib/libglfw.a(x11_init.o): undefined reference to symbol 'pthread_kill@@GLIBC_2.0'
/usr/bin/ld: note: 'pthread_kill@@GLIBC_2.0' is defined in DSO /lib/i386-linux-gnu/libpthread.so.0 so try adding it to the linker command line
/lib/i386-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [conv] Error 1
make[1]: *** [CMakeFiles/conv.dir/all] Error 2
make: *** [all] Error 2
Run Code Online (Sandbox Code Playgroud)

我用Google搜索了这个问题,并尝试通过更改来更改CMakeLists.txt

SET(CMAKE_BUILD_TYPE distribution)
SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-O3")
Run Code Online (Sandbox Code Playgroud)

SET(CMAKE_BUILD_TYPE distribution)
SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-O3 -L/usr/lib/i386-linux-gnu/lpthread")
Run Code Online (Sandbox Code Playgroud)

但没有改变.我用谷歌搜索几个小时,但我无法真正解决问题,我仍然有同样的错误.顺便说说,

TARGET_LINK_LIBRARIES(conv Xrandr pthread ftgl glfw ${OPENGL_LIBRARIES})
Run Code Online (Sandbox Code Playgroud)

我想,我不需要改变这个字符串中的任何内容?

PS我正在使用ubuntu 11.10,如果这意味着什么:)

Mar*_*iko 8

尝试使用pthread进行重新配置,如下所示:

$ CFLAGS='-lpthread' ./configure
Run Code Online (Sandbox Code Playgroud)