Ubuntu 11下g 鏈結報錯問題

2021-06-07 06:43:15 字數 1220 閱讀 9483

我在ubuntu11下編寫乙個jthread的測試程式,鏈結老報undefined reference to `jthread::jmutex::lock()錯誤

g++ -ljthread -lpthread -o jthreadtest main.o mythread.o
後改為
g++ -o jthreadtest main.o mythread.o -ljthread -lpthread
鏈結成功

g++版本為

using built-in specs.

collect_gcc=g++

target: i686-linux-gnu

configured with: ../src/configure -v --with-pkgversion='ubuntu/linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/readme.bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu

thread model: posix

gcc version 4.6.3 (ubuntu/linaro 4.6.3-1ubuntu5)

xp遠端桌面訪問ubuntu11

ubuntu 和xp下都是支援遠端桌面的,不過ubuntu 下的遠端桌面使用vnc協議,而xp下的遠端桌面使用rdp協議。當然,經過一定的配置,ubuntu 和xp是完全可以實現互相的遠端桌面控制的。以下就以ubuntu11.10為平台介紹一下。1.首先當然是安裝vnc伺服器了,ubuntu11.1...

linux下mysql遠端鏈結報錯

mysql u root 賬戶名 p 使用命令show global variables like port 檢視埠號 在下面行的開頭加上 注釋掉該行,然後儲存退出 vim 路徑可能有不同 bind address 127.0.0.1 grant all privileges on to root ...

Ubuntu11開始的root自動登入設定

共有操作 設定root密碼 sudo passwd root 設定當前使用者自動登入 系統設定 登入視窗或者使用者賬戶 11之前 sudo edit etc gdm custom.conf 將裡面的當前使用者名稱改為root即可 11之後 sudo edit etc lightdm lightdm....