linux手動編譯qt 4.8 , opengl
阿新 • • 發佈:2019-02-02
apt-get installlibgl1-mesa-dev libglu1-mesa-dev freeglut3-dev
apt-get install build-essential libpcap0.8-dev
sudo apt-get install libxau-dev libxaw7-devlibxcb1-dev libxcomposite-dev libxcursor-dev libxdamage-devlibxdmcp-dev
sudo apt-get install libxfixes-dev libxfont-dev libxft-devlibxi-dev libxinerama-dev libxkbfile-dev libxmu-devlibxmuu-dev
sudo apt-get install libxpm-dev libxrandr-dev libxrender-devlibxres-dev libxss-dev libxt-dev libxtst-dev libxv-devlibxvmc-dev
sudo apt-get install libglib2.0-dev
sudo apt-get install libssl-dev 這個命令在雙顯示卡裝qt時將系統崩潰
sudo apt-get install libgtk2.0-dev
sudo apt-get install libcups2-dev
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
sudo apt-get install libgstreamer0.10-dev
sudo apt-get install libgstreamer-plugins-base0.10-dev
編譯qt
./configure -static -release -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libjpeg -nomake demos -nomake examples -qt-sql-sqlite -prefix /usr/local/Trolltech/Qt-4.5.1_static
這裡需特意提出使用opengl, 詳看help
編譯沒問題後
make
make沒問題後
make install
沒問題後,設定環境變數
export QTDIR=/usr/local/Trolltech/Qt-4.8.6
export QTINCLUDEDIR=/usr/local/Trolltech/Qt-4.8.6/include
export PATH=$QTDIR/bin:$QTINCLUDEDIR:$PATH
export MANPATH=$QTDIR/doc/man:$MANPATH
export LD_LIBRARY_PATH=$QTDIR/lib:$QTINCLUDEDIR:$LD_LIBRARY_PATH
參考:http://www.linuxidc.com/Linux/2011-02/32537.htm
http://www.360doc.com/content/13/0116/01/7775902_260429139.shtml
apt-get install build-essential libpcap0.8-dev
sudo apt-get install libxau-dev libxaw7-devlibxcb1-dev libxcomposite-dev libxcursor-dev libxdamage-devlibxdmcp-dev
sudo apt-get install libxfixes-dev libxfont-dev libxft-devlibxi-dev libxinerama-dev libxkbfile-dev libxmu-devlibxmuu-dev
sudo apt-get install libxpm-dev libxrandr-dev libxrender-devlibxres-dev libxss-dev libxt-dev libxtst-dev libxv-devlibxvmc-dev
sudo apt-get install libglib2.0-dev
sudo apt-get install libssl-dev 這個命令在雙顯示卡裝qt時將系統崩潰
sudo apt-get install libgtk2.0-dev
sudo apt-get install libcups2-dev
sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev
sudo apt-get install libgstreamer0.10-dev
sudo apt-get install libgstreamer-plugins-base0.10-dev
編譯qt
./configure -static -release -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libjpeg -nomake demos -nomake examples -qt-sql-sqlite -prefix /usr/local/Trolltech/Qt-4.5.1_static
這裡需特意提出使用opengl, 詳看help
編譯沒問題後
make
make沒問題後
make install
沒問題後,設定環境變數
export QTDIR=/usr/local/Trolltech/Qt-4.8.6
export QTINCLUDEDIR=/usr/local/Trolltech/Qt-4.8.6/include
export PATH=$QTDIR/bin:$QTINCLUDEDIR:$PATH
export MANPATH=$QTDIR/doc/man:$MANPATH
export LD_LIBRARY_PATH=$QTDIR/lib:$QTINCLUDEDIR:$LD_LIBRARY_PATH
參考:http://www.linuxidc.com/Linux/2011-02/32537.htm
http://www.360doc.com/content/13/0116/01/7775902_260429139.shtml