家居风水

您的位置:首页 >> 家居风水

安装及编程环境设置呢

来源:基隆手机网 时间:2021.09.06

一、编译安装:

./configure ——release -plugin-sql-mysql -plugin-sql-sqlite

-plugin-sql-odbc -plugin-sql-psql

但是在运行的时候,它会可能会提示你测试不到mysql或pgsql函数于是,要增加/etc/profile环境

LD_LIBRARY_PATH=/usr/local/pgsql/lib:/usr/local/mysql/lib/mysql

要修改一下configure后Qt4源码的src/plugins/sqldrivers/mysql/o在最开始处,加上下面两行(具体的目录,需要你自己查看系统的实际位置

INCLUDEPATH += /usr/local/mysql/include/mysql LIBS +=

-L/usr/local/mysql/lib/mysql

pgsql则类似以上修改src/plugins/sqldrivers/mysql/o

其实就是一个线上转换到线下的过程 INCLUDEPATH+=/usr/local/pgsql/include /usr/local/pgsql/include/server

/usr/local/pgsql/include/internal LIBS += -L/usr/local/pgsql/lib

如果数据库如本教程是安装在/usr下,那么应该是这样:

INCLUDEPATH+=/usr/include/postgresql/server /usr/include

/postgresql/internal /usr/include/postgresql/informix LIBS += -L/usr/lib/postgresql

然后运行。/configure ——release -plugin-sql-

mysql -plugin-sql-sqlite -plugin-sql-odbc -plugin-sql-psql

-continue make make install

可能发现插件仍未被安装,进入src/plugins/sqldrivers/mysql,进行make;make install,其它数据库插件类似。

在编译QT的时候,如果在 ./configure的时候没有加任何参数的话,QT4默认编译release和debug两个版本,因此编译时间特别长,。/configure 上加上 ——release 参数。 这样只编译一份release的,可以省下一半以上的时间。

二、编程环境的设置:

编译安装非常费时,可以直接安装现成的rpm包,everest工具盘有提供,也可以到以下地址下载安装包

为了避免主用户(经常编译程序的用户)在编译软件时遇到使用的Qt3.x和Qt4学习环境相混淆,最好是新建一个专门的用户来学习Qt4编程。

新建用户并登录,然后需要在我们的shell配置文件里增加几行,bash配置文件为。bash_profile:

执行kwrite ~/.bash_profile

添加如下内容:

PATH=/usr/lib/qt4/bin:$PATH export PATH QTDIR=/usr/lib/qt4/ export QTDIR

执行以下命令:

cd /usr/bin

ln -s /usr/lib/qt4/bin/qmake qmake4

ln -s /usr/lib/qt4/bin/designer designer4

ln -s /usr/lib/qt4/bin/assistant assistant4

当然,以后如果使用了KDE4桌面就不会有这等麻烦事。

运行/usr/lib/qt4/bin/qtconfig,在Font项将字体设置为Bitstream Charter退出,避免assistant4帮助文档粗体字破碎。

北京治疗尖锐湿疣哪家医院好
长沙治妇科医院哪家好
常用的止泻药物有哪些