• 8039阅读
  • 2回复

configure?  qt-x11-opensource-src-4.4.3?  报错 [复制链接]

上一主题 下一主题
离线my253629725
 

只看楼主 倒序阅读 楼主  发表于: 2008-11-21
— 本帖被 XChinux 从 Qt for Windows 移动到本区(2010-02-07) —
我下载的版本是qt-x11-opensource-src-4.4.3
系统是Ubuntu7.10,并且安装了PostgreSQL 8.25,安装目录是/usr/local/pgsql,该目录下包含
psql的include和lib目录
修改了qt-x11-opensource-src-4.4.3/src/plugins/sqldrivers/psql目录下的psql.pro文件,内容是:
TARGET  = qsqlpsql

INCLUDEPATH += /usr/local/pgsql/include
LIBS += -L/usr/local/pgsql/lib
HEADERS        = ../../../sql/drivers/psql/qsql_psql.h
SOURCES        = main.cpp \
                  ../../../sql/drivers/psql/qsql_psql.cpp

unix: {
    !isEmpty(QT_LFLAGS_PSQL) {
        LIBS *= $$QT_LFLAGS_PSQL
        QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
    }
    !contains(LIBS, .*pq.*):LIBS *= -lpq
}

win32:!contains(LIBS, .*pq.* ) {
    !win32-g++:LIBS    *= -llibpq     
    win32-g++:LIBS *= -lpq
    LIBS    *= -lws2_32 -ladvapi32
}

include(../qsqldriverbase.pri)

configure选项是 -debug-and-release -plugin-sql-sqlite -plugin-sql-psql -v
但是还是报如下的错误,
lian@Ubuntu:/mnt/qt-x11-opensource-src-4.4.3$ /mnt/qt-x11-opensource-src-4.4.3/configure -debug-and-release -plugin-sql-sqlite -plugin-sql-psql -v

This is the Qt/X11 Open Source Edition.


WARNING: -debug-and-release is not supported anymore on Qt/X11 and Qt for Embedded Linux
By default, Qt is built in release mode with separate debug information, so
-debug-and-release is not necessary anymore

Determining system architecture... (Linux:2.6.22-14-generic: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 General Public License (GPL) versions 2 or 3.

Type '2' to view the GNU General Public License version 2.
Type '3' to view the GNU General Public License version 3.
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...
make: 没有什么可以做的为 `first'。
floatmath auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o floatmath.o floatmath.cpp
floatmath.cpp:3: 警告: 未使用的参数 ‘argc’
floatmath.cpp:3: 警告: 未使用的参数 ‘argv’
g++  -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++  -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++  -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++  -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++  -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++  -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:4:21: 错误: jpeglib.h:No such file or directory
libjpeg.cpp: In function ‘int main(int, char**)’:
libjpeg.cpp:9: 错误: ‘j_compress_ptr’ 在此作用域中尚未声明
libjpeg.cpp:9: 错误: expected `;' before ‘cinfo’
libjpeg.cpp:10: 错误: ‘cinfo’ 在此作用域中尚未声明
libjpeg.cpp:10: 错误: ‘jpeg_create_compress’ 在此作用域中尚未声明
make: *** [libjpeg.o] 错误 1
libjpeg disabled.
libtiff auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o libtiff.o libtiff.cpp
libtiff.cpp:1:20: 错误: tiffio.h:No such file or directory
libtiff.cpp:4:6: 错误: #error "Required libtiff not found"
libtiff.cpp: In function ‘int main(int, char**)’:
libtiff.cpp:11: 错误: ‘tdata_t’ 在此作用域中尚未声明
libtiff.cpp:11: 错误: expected `;' before ‘buffer’
libtiff.cpp:12: 错误: ‘buffer’ 在此作用域中尚未声明
libtiff.cpp:12: 错误: ‘_TIFFfree’ 在此作用域中尚未声明
make: *** [libtiff.o] 错误 1
libtiff disabled.
libmng auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o libmng.o libmng.cpp
libmng.cpp:1:20: 错误: libmng.h:No such file or directory
libmng.cpp:9:2: 错误: #error System libmng version is less than 1.0.9; using built-in version instead.
libmng.cpp: In function ‘int main(int, char**)’:
libmng.cpp:5: 错误: ‘mng_handle’ 在此作用域中尚未声明
libmng.cpp:5: 错误: expected `;' before ‘hMNG’
libmng.cpp:6: 错误: ‘hMNG’ 在此作用域中尚未声明
libmng.cpp:6: 错误: ‘mng_cleanup’ 在此作用域中尚未声明
make: *** [libmng.o] 错误 1
libmng disabled.
libpng auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o libpng.o libpng.cpp
libpng.cpp:1:17: 错误: png.h:No such file or directory
libpng.cpp:4:4: 错误: #error "Required libpng version 1.0.17 not found."
libpng.cpp: In function ‘int main(int, char**)’:
libpng.cpp:9: 错误: ‘png_structp’ 在此作用域中尚未声明
libpng.cpp:9: 错误: expected `;' before ‘png_ptr’
libpng.cpp:10: 错误: ‘png_ptr’ 在此作用域中尚未声明
libpng.cpp:10: 错误: ‘PNG_LIBPNG_VER_STRING’ 在此作用域中尚未声明
libpng.cpp:10: 错误: ‘png_create_read_struct’ 在此作用域中尚未声明
make: *** [libpng.o] 错误 1
libpng 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: 错误: ibase.h:No such file or directory
make: *** [ibase.o] 错误 1
InterBase disabled.
MySQL (thread-safe) auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o mysql.o ../mysql/mysql.cpp
../mysql/mysql.cpp:1:19: 错误: mysql.h:No such file or directory
make: *** [mysql.o] 错误 1
MySQL (thread-safe) disabled.
MySQL (thread-unsafe) auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o mysql.o mysql.cpp
mysql.cpp:1:19: 错误: mysql.h:No such file or directory
make: *** [mysql.o] 错误 1
MySQL (thread-unsafe) disabled.
ODBC auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o odbc.o odbc.cpp
odbc.cpp:1:17: 错误: sql.h:No such file or directory
odbc.cpp:2:20: 错误: sqlext.h:No such file or directory
make: *** [odbc.o] 错误 1
ODBC disabled.
PostgreSQL auto-detection... ()
g++ -c -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I. -o psql.o psql.cpp
psql.cpp:1:22: 错误: libpq-fe.h:No such file or directory
psql.cpp: In function ‘int main(int, char**)’:
psql.cpp:5: 错误: ‘PQescapeBytea’ 在此作用域中尚未声明
psql.cpp:6: 错误: ‘PQunescapeBytea’ 在此作用域中尚未声明
make: *** [psql.o] 错误 1
PostgreSQL support cannot be enabled due to functionality tests!
Turn on verbose messaging (-v) to /mnt/qt-x11-opensource-src-4.4.3/configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to /mnt/qt-x11-opensource-src-4.4.3/configure to continue.
离线my253629725

只看该作者 1楼 发表于: 2008-11-21
错误信息里提示找不到 libpq-fe.h,是否需要在系统的环境变量里设置PostgreSQL的环境变量
离线my253629725

只看该作者 2楼 发表于: 2008-11-21
添加PostgreSQL的插件成功,我的方式是:
configure -debug-and-release -plugin-sql-sqlite -plugin-sql-psql -I /usr/local/pgsql/include -L /usr/local/pgsql/lib  -v
数据库的路径根据安装路径的不同而不同
快速回复
限100 字节
 
上一个 下一个