【发布时间】:2013-04-21 20:59:44
【问题描述】:
我一直在使用 CentOS、Qt 4.7 和 GCC 4.4 进行开发
我刚刚安装了包含 GCC 4.7.2 的 Red Hat Developer Toolset 1.1,在make 的末尾,我收到一个错误
/usr/bin/ld: ../../bin/Solo: undefined reference to symbol 'pthread_rwlock_trywrlock@@GLIBC_2.2.5'
/usr/bin/ld: note: 'pthread_rwlock_trywrlock@@GLIBC_2.2.5' is defined in DSO /lib64/libpthread.so.0 so try adding it to the linker command line
/lib64/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
我猜 Qt 线程正在引用它。我该如何解决?
【问题讨论】:
-
您的编译器/链接器命令行是否包含
-pthread?