PDA

View Full Version : compile psql



raphaelf
24th May 2007, 12:42
Hello everybody,

I am trying to compile psqlpsql.dll and i get following error:


D:\Apps\MINGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\. .\..\mingw32\bin\ld.exe: canno
t find -lpq
collect2: ld returned 1 exit status
mingw32-make[1]: *** [d:\Apps\Qt\4.2.3\plugins\sqldrivers\qsqlpsql.dll] Error 1
mingw32-make[1]: Leaving directory `D:/apps/Qt/4.2.3/src/plugins/sqldrivers/psql
'
mingw32-make: *** [release] Error 2

I am trying like this:


D:\apps\Qt\4.2.3\src\plugins\sqldrivers\psql>qmake -o Makefile "INCLUDEPATH+=D:\
apps\PostgreSQL\8.1\include D:\apps\PostgreSQL\8.1\include\libpq" psql.pro

Can somebody see whats wrong?

Thanks

L.Marvell
24th May 2007, 13:01
Did you read Assistant->SQL Database Drivers->QPSQL for PostgreSQL (Version 7.3 and Above) ?

How to Build the Plugin on Windows
Install the PostgreSQL developer libraries. Assuming that PostgreSQL was installed in
C:\psql, build the plugin as follows:

cd %QTDIR%\src\plugins\sqldrivers\psql
qmake -o Makefile "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro
nmake

patrik08
24th May 2007, 15:38
Did you read Assistant->SQL Database Drivers->QPSQL for PostgreSQL (Version 7.3 and Above) ?


Warning MINGW compiler is not VS... i suppose PostgreSQL have the same problem like mysql ..



cd VS buildet lib dir ....
reimp -d libmysql.lib
dlltool -k --input-def libmysql.def --dllname libmysql.dll --output-lib libmysql.a
dlltool --input-def libmysql.def --dllname libmysql.dll --output-lib c:\MINGW\lib\libmysql.a
/* move mysql include to MINGW\include\*/
/*
cd qtdir
configure -qt-sql-mysql -qt-sql-odbc -qt-sql-sqlite -qt-gif -qt-libpng -qt-libjpeg

*/


test this as sample to PostgreSQL chance the lib to PostgreSQL

L.Marvell
27th May 2007, 00:26
Warning MINGW compiler is not VS... i suppose PostgreSQL have the same problem like mysql ..



cd VS buildet lib dir ....
reimp -d libmysql.lib
dlltool -k --input-def libmysql.def --dllname libmysql.dll --output-lib libmysql.a
dlltool --input-def libmysql.def --dllname libmysql.dll --output-lib c:\MINGW\lib\libmysql.a
/* move mysql include to MINGW\include\*/
/*
cd qtdir
configure -qt-sql-mysql -qt-sql-odbc -qt-sql-sqlite -qt-gif -qt-libpng -qt-libjpeg

*/


test this as sample to PostgreSQL chance the lib to PostgreSQL
Nope, I didn't have such problems with Postgres, all builds without problems.