我已經在CentOS,QT 4.7開發和GCC 4.4鏈接錯誤:未定義的參考符號「pthread_rwlock_trywrlock @@ GLIBC_2.2.5」
我剛剛安裝紅帽開發工具套件1.1,其中包括GCC 4.7 。2,並在make
年底,我得到一個錯誤
/usr/bin/ld: ../../bin/Solo: undefined reference to symbol '[email protected]@GLIBC_2.2.5'
/usr/bin/ld: note: '[email protected]@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'? – 2013-04-27 22:49:49