• 7346阅读
  • 5回复

[已解决]4.5.0 QT compile  error  with -qt-sql-mysql? [复制链接]

上一主题 下一主题
离线jacke_wang
 
只看楼主 倒序阅读 楼主  发表于: 2010-04-26
— 本帖被 XChinux 从 General Qt Programming 移动到本区(2011-01-02) —
[root@localhost qt-x11-opensource-src-4.5.0]# ./configure -qt-sql-mysql -v

This is the Qt/X11 Open Source Edition.

Determining system architecture... (Linux:2.6.18-53.el5xen:i686)
    32-bit Intel 80x86 (i386)
    'i386' is supported
System architecture: 'i386'
Precompiled-headers support enabled.
Separate debug info support enabled.
Symbol visibility control enabled.
You are licensed to use this software under the terms of
the GNU Lesser General Public License (LGPL) version 2.1 or
the GNU General Public License (GPL) version 3.

Type '3' to view the GNU General Public License version 3.
Type 'L' to view the GNU Lesser General Public License version 2.1.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of either license? yes

Creating qmake. Please wait...
g++ -c -o option.o -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/share/qt-x11-opensource-src-4.5.0/include -I/share/qt-x11-opensource-src-4.5.0/include/QtCore -I/share/qt-x11-opensource-src-4.5.0/src/corelib/global -I/share/qt-x11-opensource-src-4.5.0/src/script -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/share/qt-x11-opensource-src-4.5.0/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  option.cpp
g++ -c -o qlibraryinfo.o -pipe -DQMAKE_OPENSOURCE_EDITION -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -I/share/qt-x11-opensource-src-4.5.0/include -I/share/qt-x11-opensource-src-4.5.0/include/QtCore -I/share/qt-x11-opensource-src-4.5.0/src/corelib/global -I/share/qt-x11-opensource-src-4.5.0/src/script -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/share/qt-x11-opensource-src-4.5.0/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT  /share/qt-x11-opensource-src-4.5.0/src/corelib/global/qlibraryinfo.cpp
g++ -o "/share/qt-x11-opensource-src-4.5.0/bin/qmake" project.o property.o main.o makefile.o unixmake2.o unixmake.o mingw_make.o option.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o borland_bmake.o msvc_dsp.o msvc_vcproj.o msvc_nmake.o msvc_objectmodel.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlistdata.o qfile.o qfsfileengine_unix.o qfsfileengine_iterator_unix.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlinkedlist.o qurl.o qnumeric.o qcryptographichash.o qscriptasm.o qscriptast.o qscriptastvisitor.o qscriptcompiler.o qscriptecmaarray.o qscriptecmaboolean.o qscriptecmacore.o qscriptecmadate.o qscriptecmafunction.o qscriptecmaglobal.o qscriptecmamath.o qscriptecmanumber.o qscriptecmaobject.o qscriptecmaregexp.o qscriptecmastring.o qscriptecmaerror.o qscriptcontext_p.o qscriptengine.o qscriptengine_p.o qscriptextenumeration.o qscriptextvariant.o qscriptcontext.o qscriptfunction.o qscriptgrammar.o qscriptlexer.o qscriptclassdata.o qscriptparser.o qscriptprettypretty.o qscriptsyntaxchecker.o qscriptvalue.o qscriptvalueimpl.o qscriptvalueiterator.o qscriptvalueiteratorimpl.o qscriptclass.o qscriptclasspropertyiterator.o qscriptengineagent.o qscriptcontextinfo.o qscriptstring.o  
floatmath auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o floatmath.o floatmath.cpp
floatmath.cpp:3: warning: unused parameter ‘argc’
floatmath.cpp:3: warning: unused parameter ‘argv’
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.0/lib -o floatmath floatmath.o    
floatmath enabled.
mmx auto-detection... ()
g++ -c -pipe -mmmx -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o mmx.o mmx.cpp
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.0/lib -o mmx mmx.o     -mmmx
mmx enabled.
3dnow auto-detection... ()
g++ -c -pipe -m3dnow -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o 3dnow.o 3dnow.cpp
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.0/lib -o 3dnow 3dnow.o     -m3dnow
3dnow enabled.
sse auto-detection... ()
g++ -c -pipe -msse -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o sse.o sse.cpp
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.0/lib -o sse sse.o     -msse
sse enabled.
sse2 auto-detection... ()
g++ -c -pipe -msse2 -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o sse2.o sse2.cpp
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.0/lib -o sse2 sse2.o     -msse2
sse2 enabled.
zlib auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o zlib.o zlib.cpp
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.0/lib -o zlib zlib.o     -lz
zlib enabled.
libjpeg auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o libjpeg.o libjpeg.cpp
libjpeg.cpp: In function ‘int main(int, char**)’:
libjpeg.cpp:10: warning: ‘cinfo’ is used uninitialized in this function
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.0/lib -o libjpeg libjpeg.o     -ljpeg
libjpeg enabled.
libtiff auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o libtiff.o libtiff.cpp
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.0/lib -o libtiff libtiff.o     -ltiff
libtiff enabled.
libmng auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o libmng.o libmng.cpp
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.0/lib -o libmng libmng.o     -lmng
libmng enabled.
libpng auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o libpng.o libpng.cpp
g++ -Wl,-O1 -Wl,-rpath,/usr/local/Trolltech/Qt-4.5.0/lib -o libpng libpng.o     -lpng
libpng enabled.
DB2 auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o db2.o db2.cpp
db2.cpp:1:20: error: sqlcli.h: No such file or directory
db2.cpp:2:21: error: sqlcli1.h: No such file or directory
make: *** [db2.o] Error 1
DB2 disabled.
InterBase auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o ibase.o ibase.cpp
ibase.cpp:1:19: error: ibase.h: No such file or directory
make: *** [ibase.o] Error 1
InterBase disabled.
MySQL (thread-safe) auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I/usr/include/mysql -I. -o mysql.o ../mysql/mysql.cpp
../mysql/mysql.cpp:1:19: error: mysql.h: No such file or directory
make: *** [mysql.o] Error 1
MySQL (thread-safe) disabled.
MySQL (thread-unsafe) auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I/usr/include/mysql -I. -o mysql.o mysql.cpp
mysql.cpp:1:19: error: mysql.h: No such file or directory
make: *** [mysql.o] Error 1
MySQL (thread-unsafe) disabled.
MySQL support cannot be enabled due to functionality tests!
Turn on verbose messaging (-v) to ./configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to ./configure to continue.
Any idea?
[ 此帖被午小夜在2010-04-27 20:55重新编辑 ]
离线jacke_wang
只看该作者 1楼 发表于: 2010-04-26
顶上去,大家帮帮忙
离线午小夜

只看该作者 2楼 发表于: 2010-04-26
error: mysql.h: No such file or directory
[操作系统版本]  Windows XP;Linux Ubuntu;Linux Fedora;
[Qt SDK版本]    4.7.0
[SDK 发布日期]  2010.05
[IDE(集成开发环境)] QtCreator
个人网页:http://hi.baidu.com/午小夜
學歷:Royal Jalidon
离线午小夜

只看该作者 3楼 发表于: 2010-04-26
[操作系统版本]  Windows XP;Linux Ubuntu;Linux Fedora;
[Qt SDK版本]    4.7.0
[SDK 发布日期]  2010.05
[IDE(集成开发环境)] QtCreator
个人网页:http://hi.baidu.com/午小夜
學歷:Royal Jalidon
离线hehui

只看该作者 4楼 发表于: 2010-04-27
简单方法:
1.把Mysql的Include里的文件都放到qmysql.h所在的文件夹
2.把qmysql.h里的#include <mysql.h> 改成#include ”mysql.h“

要 不然就自己设置环境变量了~
离线jacke_wang
只看该作者 5楼 发表于: 2010-04-27
重新装了mysql环境 解决了
快速回复
限100 字节
 
上一个 下一个