Qt-interest Archive, April 2007
Problem with QPSQL plugin
Message 1 in thread
Hello
I am trying to build the PostgreSQL plugin according to the instructions
given at
http://doc.trolltech.com/4.2/sql-driver.html
A small part of the errors occured:
C:\Qt\4.2.3\src\plugins\sqldrivers\psql>qmake -o Makefile
"INCLUDEPATH+=C:\Progr
am Files\PostgreSQL\8.2\include" "LIBS+=C:\Program
Files\PostgreSQL\8.2\lib\ms\l
ibpq.lib" psql.pro
C:\Qt\4.2.3\src\plugins\sqldrivers\psql>make
mingw32-make -f Makefile.Debug all
mingw32-make[1]: Entering directory
`C:/Qt/4.2.3/src/plugins/sqldrivers/psql'
g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
-DQT_NO_
CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB
-DQT_COR
E_LIB -DQT_THREAD_SUPPORT -I"C:/Qt/4.2.3/include/QtCore"
-I"C:/Qt/4.2.3/include/
QtCore" -I"C:/Qt/4.2.3/include/QtSql" -I"C:/Qt/4.2.3/include/QtSql"
-I"C:/Qt/4.2
.3/include" -I"c:\Program" -I"Files\PostgreSQL\8.2\include" -I"c:\Program"
-I"Fi
les\PostgreSQL\8.2\include" -I"C:/Qt/4.2.3/include/ActiveQt"
-I"tmp\moc\debug_sh
ared" -I"." -I"..\..\..\..\mkspecs\win32-g++" -o
tmp\obj\debug_shared\qsql_psql.
o ..\..\..\sql\drivers\psql\qsql_psql.cpp
..\..\..\sql\drivers\psql\qsql_psql.cpp:37:22: libpq-fe.h: No such file or
direc
tory
..\..\..\sql\drivers\psql\qsql_psql.cpp: In function `QSqlError
qMakeError(const
QString&, QSqlError::ErrorType, const QPSQLDriverPrivate*)':
..\..\..\sql\drivers\psql\qsql_psql.cpp:127: error: `PQerrorMessage'
undeclared
(first use this function)
..\..\..\sql\drivers\psql\qsql_psql.cpp:127: error: (Each undeclared
identifier
is reported only once for each function it appears in.)
Are the above errors related with a problem accessing the PostgreSQL include
files and
libraries? I cannot also use the "nmake" command, so consequently i use "
make" instead.
Any ideas? Thank you in advance.
--
[ signature omitted ]
Message 2 in thread
I had similar problems with MySQL.
The problem is that spaces do not seem to be permitted in the directory
argument of the -I and -L options.
I tried using 8.3 style names and still failed.
The way I solved the problem was to create C:\MySQL\include and C:\MySQL\lib
directories so that I could pass them to the -I and -L options with no
spaces.
I would suggest that you create C:\pgsql\include and c:\pgsql\lib and then
copy all the include files and lib files to those locations.
Karl
_____
From: Nikos Geronitidis [mailto:geronik444@xxxxxxxxx]
Sent: Thursday, April 26, 2007 3:32 PM
To: qt-interest@xxxxxxxxxxxxx
Subject: Problem with QPSQL plugin
Hello
I am trying to build the PostgreSQL plugin according to the instructions
given at
http://doc.trolltech.com/4.2/sql-driver.html
A small part of the errors occured:
C:\Qt\4.2.3\src\plugins\sqldrivers\psql>qmake -o Makefile
"INCLUDEPATH+=C:\Progr
am Files\PostgreSQL\8.2\include" "LIBS+=C:\Program
Files\PostgreSQL\8.2\lib\ms\l
ibpq.lib" psql.pro
C:\Qt\4.2.3\src\plugins\sqldrivers\psql>make
mingw32-make -f Makefile.Debug all
mingw32-make[1]: Entering directory
`C:/Qt/4.2.3/src/plugins/sqldrivers/psql'
g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
-DQT_NO_
CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB
-DQT_COR
E_LIB -DQT_THREAD_SUPPORT -I"C:/Qt/4.2.3/include/QtCore"
-I"C:/Qt/4.2.3/include/
QtCore" -I"C:/Qt/4.2.3/include/QtSql" -I"C:/Qt/4.2.3/include/QtSql"
-I"C:/Qt/4.2
.3/include" -I"c:\Program" -I"Files\PostgreSQL\8.2\include" -I"c:\Program"
-I"Fi
les\PostgreSQL\8.2\include" -I"C:/Qt/4.2.3/include/ActiveQt"
-I"tmp\moc\debug_sh
ared" -I"." -I"..\..\..\..\mkspecs\win32-g++" -o
tmp\obj\debug_shared\qsql_psql.
o ..\..\..\sql\drivers\psql\qsql_psql.cpp
..\..\..\sql\drivers\psql\qsql_psql.cpp:37:22: libpq-fe.h: No such file or
direc
tory
..\..\..\sql\drivers\psql\qsql_psql.cpp: In function `QSqlError
qMakeError(const
QString&, QSqlError::ErrorType, const QPSQLDriverPrivate*)':
..\..\..\sql\drivers\psql\qsql_psql.cpp:127: error: `PQerrorMessage'
undeclared
(first use this function)
..\..\..\sql\drivers\psql\qsql_psql.cpp:127: error: (Each undeclared
identifier
is reported only once for each function it appears in.)
Are the above errors related with a problem accessing the PostgreSQL include
files and
libraries? I cannot also use the "nmake" command, so consequently i use
"make" instead.
Any ideas? Thank you in advance.
--
[ signature omitted ]
Message 3 in thread
Karl Ruetz schrieb:
> I had similar problems with MySQL.
>
>
>
> The problem is that spaces do not seem to be permitted in the directory
> argument of the –I and –L options.
This is not true. You can put them in double-quotes on windows and it works.
>
> I tried using 8.3 style names and still failed.
>
> The way I solved the problem was to create C:\MySQL\include and
> C:\MySQL\lib directories so that I could pass them to the –I and –L
> options with no spaces.
>
> I would suggest that you create C:\pgsql\include and c:\pgsql\lib and
> then copy all the include files and lib files to those locations.
>
>
>
> Karl
>
>
>
> ------------------------------------------------------------------------
>
> *From:* Nikos Geronitidis [mailto:geronik444@xxxxxxxxx]
> *Sent:* Thursday, April 26, 2007 3:32 PM
> *To:* qt-interest@xxxxxxxxxxxxx
> *Subject:* Problem with QPSQL plugin
>
>
>
> Hello
>
> I am trying to build the PostgreSQL plugin according to the
> instructions given at
> http://doc.trolltech.com/4.2/sql-driver.html
> A small part of the errors occured:
>
> /C:\Qt\4.2.3\src\plugins\sqldrivers\psql>qmake -o Makefile
> "INCLUDEPATH+=C:\Progr
> am Files\PostgreSQL\8.2\include" "LIBS+=C:\Program
> Files\PostgreSQL\8.2\lib\ms\l
> ibpq.lib" psql.pro <http://psql.pro>/ /
> C:\Qt\4.2.3\src\plugins\sqldrivers\psql>make
> mingw32-make -f Makefile.Debug all/ /
> mingw32-make[1]: Entering directory
> `C:/Qt/4.2.3/src/plugins/sqldrivers/psql'
> g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
> -DQT_NO_
> CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_SQL_LIB
> -DQT_COR
> E_LIB -DQT_THREAD_SUPPORT -I"C:/Qt/4.2.3/include/QtCore"
> -I"C:/Qt/4.2.3/include/
> QtCore" -I"C:/Qt/4.2.3/include/QtSql" -I"C:/Qt/4.2.3/include/QtSql"
> -I"C:/Qt/4.2
> .3/include" -I"c:\Program" -I"Files\PostgreSQL\8.2\include"
> -I"c:\Program" -I"Fi
> les\PostgreSQL\8.2\include" -I"C:/Qt/4.2.3/include/ActiveQt"
> -I"tmp\moc\debug_sh
> ared" -I"." -I"..\..\..\..\mkspecs\win32-g++" -o
> tmp\obj\debug_shared\qsql_psql.
> o ..\..\..\sql\drivers\psql\qsql_psql.cpp
> ..\..\..\sql\drivers\psql\qsql_psql.cpp:37:22: libpq-fe.h: No such file
> or direc
> tory
> ..\..\..\sql\drivers\psql\qsql_psql.cpp: In function `QSqlError
> qMakeError(const
> QString&, QSqlError::ErrorType, const QPSQLDriverPrivate*)':
> ..\..\..\sql\drivers\psql\qsql_psql.cpp:127: error: `PQerrorMessage'
> undeclared
> (first use this function)
> ..\..\..\sql\drivers\psql\qsql_psql.cpp:127: error: (Each undeclared
> identifier
> is reported only once for each function it appears in.)/
>
> Are the above errors related with a problem accessing the PostgreSQL
> include files and
> libraries? I cannot also use the /"nmake"/ command, so consequently i
> use /"make"/ instead.
> Any ideas? Thank you in advance.
>
> --
> Best Regards
> Nikos Gerontidis
>
--
[ signature omitted ]
Message 4 in thread
I tried putting double-quotes and still got the error. It is possible I did
something silly with my typing. However, simplifying the paths to the
include and lib directories definately got me beyond this issue.
Karl
Thomas Dähling writes:
> This is not true. You can put them in double-quotes on windows and it
> works.
> Karl Ruetz schrieb:
>> I had similar problems with MySQL.
>> The problem is that spaces do not seem to be permitted in the directory
>> argument of the ?I and ?L options.
--
[ signature omitted ]
Message 5 in thread
I think you need to change your quoting in the qmake command. If you
notice in the make command your include path seems to have been split
up.
-----Original Message-----
From: Nikos Geronitidis [mailto:geronik444@xxxxxxxxx]
Sent: Thursday, April 26, 2007 13:32
To: qt-interest@xxxxxxxxxxxxx
Subject: Problem with QPSQL plugin
Hello
I am trying to build the PostgreSQL plugin according to the
instructions given at
http://doc.trolltech.com/4.2/sql-driver.html
A small part of the errors occured:
C:\Qt\4.2.3\src\plugins\sqldrivers\psql>qmake -o Makefile
"INCLUDEPATH+=C:\Progr
am Files\PostgreSQL\8.2\include" "LIBS+=C:\Program
Files\PostgreSQL\8.2\lib\ms\l
ibpq.lib" psql.pro
C:\Qt\4.2.3\src\plugins\sqldrivers\psql>make
mingw32-make -f Makefile.Debug all
mingw32-make[1]: Entering directory
`C:/Qt/4.2.3/src/plugins/sqldrivers/psql'
g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE
-DQT_LARGEFILE_SUPPORT -DQT_NO_
CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN
-DQT_SQL_LIB -DQT_COR
E_LIB -DQT_THREAD_SUPPORT -I"C:/Qt/4.2.3/include/QtCore"
-I"C:/Qt/4.2.3/include/
QtCore" -I"C:/Qt/4.2.3/include/QtSql"
-I"C:/Qt/4.2.3/include/QtSql" -I"C:/Qt/4.2
.3/include" -I"c:\Program" -I"Files\PostgreSQL\8.2\include"
-I"c:\Program" -I"Fi
les\PostgreSQL\8.2\include" -I"C:/Qt/4.2.3/include/ActiveQt"
-I"tmp\moc\debug_sh
ared" -I"." -I"..\..\..\..\mkspecs\win32-g++" -o
tmp\obj\debug_shared\qsql_psql.
o ..\..\..\sql\drivers\psql\qsql_psql.cpp
..\..\..\sql\drivers\psql\qsql_psql.cpp:37:22: libpq-fe.h: No
such file or direc
tory
..\..\..\sql\drivers\psql\qsql_psql.cpp: In function `QSqlError
qMakeError(const
QString&, QSqlError::ErrorType, const QPSQLDriverPrivate*)':
..\..\..\sql\drivers\psql\qsql_psql.cpp:127: error:
`PQerrorMessage' undeclared
(first use this function)
..\..\..\sql\drivers\psql\qsql_psql.cpp:127: error: (Each
undeclared identifier
is reported only once for each function it appears in.)
Are the above errors related with a problem accessing the
PostgreSQL include files and
libraries? I cannot also use the "nmake" command, so
consequently i use "make" instead.
Any ideas? Thank you in advance.
--
Best Regards
Nikos Gerontidis
Message 6 in thread
Thank you all for your instant hepl.
Jones writes:
I think you need to change your quoting in the qmake command. If you
notice in the make command your include path seems to have been split up.
Karl Ruetz schrieb:
I had similar problems with MySQL.
The problem is that spaces do not seem to be permitted in the directory
argument of the –I and –L options.
Thomas Dähling writes:
This is not true. You can put them in double-quotes on windows and it works.
The problem solved when double quoting used, but before that i had
experienced a strange problem; when i typed the include and libraries' paths
in the qt command prompt, similar errors occured. Then I just copy pasted
the command:
qmake -o Makefile "INCLUDEPATH+=C:\psql\include"
"LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro
shown at:
http://doc.trolltech.com/4.2/sql-driver.html
and the problem solved. Only guesses could i made for that..
Karl Ruetz schrieb:
The way I solved the problem was to create C:\MySQL\include and C:\MySQL\lib
directories so that I could pass them to the –I and –L options with no
spaces.
I would suggest that you create C:\pgsql\include and c:\pgsql\lib and then
copy all the include files and lib files to those locations.
This was also very helpful; I followed your instructions and compiled the
plugin without a problem, before noticing the above strange behaviour which
was related to copy paste and typing methods..
--
[ signature omitted ]