Linux下编译Qt源码,一定要下载tar.gz版本,否则会报权限不足
2016-04-14 05:04
627 查看
首先下载qt-everywhere-opensource-src-4.8.1源码,下载地址:
ftp://ftp.qt-project.org/qt/source/
在Linux下编译一定要下载qt-everywhere-opensource-src-4.8.1.tar.gz 不能用qt-everywhere-opensource-src-4.8.1.zip,因为在configure时,会报没有权限和文本编码等错误。
编译Qt之前都需要安装tslib,具体安装方法请看:tslib安装。
由于配置的命令比较多,我自己写了一个自动安装脚本:
[html] view plain copy
#!/bin/sh
export PATH=/opt/FriendlyARM/toolschain/4.4.3/bin:$PATH
export TOOLCHAIN=/opt/FriendlyARM/toolschain/4.4.3
export TB_CC_PREFIX=arm-linux-
export PKG_CONFIG_PREFIX=$TOOLCHAIN/arm-none-linux-gnueabi
export MAKE=/usr/bin/make
echo "Delect the exist direction"
rm -rf qt-everywhere-opensource-src-4.8.1
rm -rf /opt/Qt4.8.1
echo "Unzip qt source"
tar xzvf qt-everywhere-opensource-src-4.8.1.tar.gz
cd qt-everywhere-opensource-src-4.8.1
echo "Configure ..."
#chmod +x configure
#dos2unix configure
./configure \
-prefix /opt/Qt4.8.1 \
-opensource \
-embedded arm \
-xplatform qws/linux-arm-g++ \
-depths 16,18,24,32 \
-no-glib \
-no-cups \
-no-largefile \
-no-accessibility \
-no-openssl \
-no-gtkstyle \
-no-qt3support \
-no-phonon \
-no-webkit \
-no-libtiff \
-no-libmng \
-qt-zlib \
-qt-libpng \
-qt-libjpeg \
-no-nis \
-no-dbus \
-little-endian \
-host-little-endian \
-qt-freetype \
-qt-gfx-transformed \
-qt-gfx-vnc \
-qt-gfx-linuxfb \
-qt-gfx-multiscreen \
-qt-kbd-tty \
-qt-mouse-tslib \
-I/usr/local/arm/tslib/include \
-L/usr/local/arm/tslib/lib \
2>&1 | tee conf_log
echo "Make..."
make 2>&1 | tee make_log
echo "Inatall..."
make install
http://blog.csdn.net/jecan123/article/details/8760191
ftp://ftp.qt-project.org/qt/source/
在Linux下编译一定要下载qt-everywhere-opensource-src-4.8.1.tar.gz 不能用qt-everywhere-opensource-src-4.8.1.zip,因为在configure时,会报没有权限和文本编码等错误。
编译Qt之前都需要安装tslib,具体安装方法请看:tslib安装。
由于配置的命令比较多,我自己写了一个自动安装脚本:
[html] view plain copy
#!/bin/sh
export PATH=/opt/FriendlyARM/toolschain/4.4.3/bin:$PATH
export TOOLCHAIN=/opt/FriendlyARM/toolschain/4.4.3
export TB_CC_PREFIX=arm-linux-
export PKG_CONFIG_PREFIX=$TOOLCHAIN/arm-none-linux-gnueabi
export MAKE=/usr/bin/make
echo "Delect the exist direction"
rm -rf qt-everywhere-opensource-src-4.8.1
rm -rf /opt/Qt4.8.1
echo "Unzip qt source"
tar xzvf qt-everywhere-opensource-src-4.8.1.tar.gz
cd qt-everywhere-opensource-src-4.8.1
echo "Configure ..."
#chmod +x configure
#dos2unix configure
./configure \
-prefix /opt/Qt4.8.1 \
-opensource \
-embedded arm \
-xplatform qws/linux-arm-g++ \
-depths 16,18,24,32 \
-no-glib \
-no-cups \
-no-largefile \
-no-accessibility \
-no-openssl \
-no-gtkstyle \
-no-qt3support \
-no-phonon \
-no-webkit \
-no-libtiff \
-no-libmng \
-qt-zlib \
-qt-libpng \
-qt-libjpeg \
-no-nis \
-no-dbus \
-little-endian \
-host-little-endian \
-qt-freetype \
-qt-gfx-transformed \
-qt-gfx-vnc \
-qt-gfx-linuxfb \
-qt-gfx-multiscreen \
-qt-kbd-tty \
-qt-mouse-tslib \
-I/usr/local/arm/tslib/include \
-L/usr/local/arm/tslib/lib \
2>&1 | tee conf_log
echo "Make..."
make 2>&1 | tee make_log
echo "Inatall..."
make install
http://blog.csdn.net/jecan123/article/details/8760191
相关文章推荐
- Linux平台用C++实现信号量,同步线程
- Linux线程同步的三种控制方法
- Linux IO Scheduler(Linux IO 调度器)
- linux Vi编辑器的使用(基本操作)
- Linux下进程通信的八种方法
- Linux进程间通讯的几种方式
- Linux Socket五种I/O模型
- Linux五种IO模型
- linux下Epoll实现简单的C/S通信
- Linux epoll详解
- 关于linux启动救援模式进行恢复步骤
- centos 7 中防火墙的关闭问题
- Linux内核分析作业八
- Linux用户和用户组
- LINUX安全--构造数据实现缓冲区溢出
- 每天一个linux命令(22):find 命令的参数详解
- CentOS安装Maven
- 查看win或者Linux端口是否被占用
- 浅谈Linux进程调度过程
- CentOS查看内核版本,位数,版本号