postgres 9 + QT 4.7 - problem

0

http://blog.emanuelkoczwara.pl/id/486008/

zrobiłem to samo dla wersji postgresa 9.0.4
no i mam błędy - nie da się

błąd przy instrukcji make install

make [2] [postgres.def] Error 5
make [1]
[install] Error 1

podobne są czy instrukcji make

połączył ktos PGSQL-a 9 z QT?

0

poradziłem sobie tak
ze się łączę przez ODBC

ale jednak chciałbym za pomoca QPGSL

0

Wpisz Bracie w assistanta frazę "SQL Database Drivers" tam masz znacznie lepiej opisane,jak kompilować pluginy sqlowe do Qt.Postgresa wprawdzie nie stosowałem,ale onegdaj zrobiłem plugin do mysqla kierując się tym właśnie opisem

0
MasterBLB napisał(a)

Wpisz Bracie w assistanta frazę "SQL Database Drivers" tam masz znacznie lepiej opisane,jak kompilować pluginy sqlowe do Qt.Postgresa wprawdzie nie stosowałem,ale onegdaj zrobiłem plugin do mysqla kierując się tym właśnie opisem

dzięki za odpowiedź
ale jest jeden problem

wszędzie
http://www.qtcentre.org/wiki/[...]plugin_on_Windows_using_MinGW
http://4programmers.net/Forum/C_iC++/175606-qt+_mysql = akurat do MYSQL-a

jest mowa o tym aby ściagnąć MINGW, żeby skorzystac z dlltool-a i reimp-a brak

http://sourceforge.net/projects/mingw/ - ściągam stąd

no i dlltool jest a reimpa brak

0

Mingw ściągać wtedy,jak nie masz nmake'a od visuala.Jak masz,to jedziesz wg Assistanta:

How to Build the QPSQL Plugin on Windows (wyżej pisza,aby użyć co najmniej postgresa 7.3)
Install the appropriate PostgreSQL developer libraries for your compiler. Assuming that PostgreSQL was installed in C:\psql, build the plugin as follows:
cd %QTDIR%\src\plugins\sqldrivers\psql
qmake "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro
nmake

0
_fredi__ napisał(a)

dlltool jest a reimpa brak

tutaj znajdziesz reimp'a gdybyś chciał z mingw skorzystać.

0

dzięki za odpowiedź
ale kurde tak robiłem

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

z uwzględnieniem ścieżek jakie są u mnie

no i nmake mam z Visual Studio

no i jedyne co to kupa błędów

g++ -c -g -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_S
UPPORT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_DLL -DQT_PLUGIN -DQT_S
QL_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"........\include\QtCore" -I"....
....\include\QtSql" -I"........\include" -I"g:\Programiles\PostgreSQL\9.0\i
nclude" -I"........\include\ActiveQt" -I"tmp\moc\debug_shared" -I"........
\mkspecs\win32-g++" -o tmp\obj\debug_shared\qsql_psql.o ......\sql\drivers\psq
l\qsql_psql.cpp
......\sql\drivers\psql\qsql_psql.cpp:58:22: error: libpq-fe.h: No such file o
r directory
......\sql\drivers\psql\qsql_psql.cpp:59:23: error: pg_config.h: No such file
or directory
......\sql\drivers\psql\qsql_psql.cpp: In function 'QSqlError qMakeError(const
QString&, QSqlError::ErrorType, const QPSQLDriverPrivate)':
......\sql\drivers\psql\qsql_psql.cpp:176: error: 'PQerrorMessage' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'bool QPSQLResultPri
vate::processResults()':
......\sql\drivers\psql\qsql_psql.cpp:186: error: 'PQresultStatus' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp:187: error: 'PGRES_TUPLES_OK' was not de
clared in this scope
......\sql\drivers\psql\qsql_psql.cpp:190: error: 'PQntuples' was not declared
in this scope
......\sql\drivers\psql\qsql_psql.cpp:192: error: 'PGRES_COMMAND_OK' was not d
eclared in this scope
......\sql\drivers\psql\qsql_psql.cpp: In function 'void qDeallocatePreparedSt
mt(QPSQLResultPrivate
)':
......\sql\drivers\psql\qsql_psql.cpp:254: error: 'PQexec' was not declared in
this scope
......\sql\drivers\psql\qsql_psql.cpp:256: error: 'PQresultStatus' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp:256: error: 'PGRES_COMMAND_OK' was not d
eclared in this scope
......\sql\drivers\psql\qsql_psql.cpp:257: error: 'PQerrorMessage' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp:258: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'void QPSQLResult::c
leanup()':
......\sql\drivers\psql\qsql_psql.cpp:288: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual bool QPSQLR
esult::fetchLast()':
......\sql\drivers\psql\qsql_psql.cpp:316: error: 'PQntuples' was not declared
in this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual QVariant QP
SQLResult::data(int)':
......\sql\drivers\psql\qsql_psql.cpp:321: error: 'PQnfields' was not declared
in this scope
......\sql\drivers\psql\qsql_psql.cpp:325: error: 'PQftype' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:327: error: 'PQgetvalue' was not declare
d in this scope
......\sql\drivers\psql\qsql_psql.cpp:328: error: 'PQgetisnull' was not declar
ed in this scope
......\sql\drivers\psql\qsql_psql.cpp:407: error: 'PQunescapeBytea' was not de
clared in this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual bool QPSQLR
esult::isNull(int)':
......\sql\drivers\psql\qsql_psql.cpp:421: error: 'PQgetvalue' was not declare
d in this scope
......\sql\drivers\psql\qsql_psql.cpp:422: error: 'PQgetisnull' was not declar
ed in this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual bool QPSQLR
esult::reset(const QString&)':
......\sql\drivers\psql\qsql_psql.cpp:434: error: 'PQexec' was not declared in
this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual int QPSQLRe
sult::numRowsAffected()':
......\sql\drivers\psql\qsql_psql.cpp:445: error: 'PQcmdTuples' was not declar
ed in this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual QVariant QP
SQLResult::lastInsertId() const':
......\sql\drivers\psql\qsql_psql.cpp:451: error: 'Oid' was not declared in th
is scope
......\sql\drivers\psql\qsql_psql.cpp:451: error: expected ';' before 'id'
......\sql\drivers\psql\qsql_psql.cpp:452: error: 'id' was not declared in thi
s scope
......\sql\drivers\psql\qsql_psql.cpp:452: error: 'InvalidOid' was not declare
d in this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual QSqlRecord
QPSQLResult::record() const':
......\sql\drivers\psql\qsql_psql.cpp:464: error: 'PQnfields' was not declared
in this scope
......\sql\drivers\psql\qsql_psql.cpp:468: error: 'PQfname' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:470: error: 'PQfname' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:471: error: 'PQftype' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:472: error: 'PQfsize' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:473: error: 'PQfmod' was not declared in
this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual bool QPSQLR
esult::prepare(const QString&)':
......\sql\drivers\psql\qsql_psql.cpp:567: error: 'PQexec' was not declared in
this scope
......\sql\drivers\psql\qsql_psql.cpp:569: error: 'PQresultStatus' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp:569: error: 'PGRES_COMMAND_OK' was not d
eclared in this scope
......\sql\drivers\psql\qsql_psql.cpp:572: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:577: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual bool QPSQLR
esult::exec()':
......\sql\drivers\psql\qsql_psql.cpp:598: error: 'PQexec' was not declared in
this scope
......\sql\drivers\psql\qsql_psql.cpp: In function 'bool setEncodingUtf8(PGcon
n)':
......\sql\drivers\psql\qsql_psql.cpp:607: error: 'PQexec' was not declared in
this scope
......\sql\drivers\psql\qsql_psql.cpp:608: error: 'PQresultStatus' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp:609: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:610: error: 'PGRES_COMMAND_OK' was not d
eclared in this scope
......\sql\drivers\psql\qsql_psql.cpp: In function 'void setDatestyle(PGconn
)
':
......\sql\drivers\psql\qsql_psql.cpp:615: error: 'PQexec' was not declared in
this scope
......\sql\drivers\psql\qsql_psql.cpp:616: error: 'PQresultStatus' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp:617: error: 'PGRES_COMMAND_OK' was not d
eclared in this scope
......\sql\drivers\psql\qsql_psql.cpp:618: error: 'PQerrorMessage' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp:619: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp: In function 'QPSQLDriver::Protocol getP
SQLVersion(PGconn*)':
......\sql\drivers\psql\qsql_psql.cpp:625: error: 'PQexec' was not declared in
this scope
......\sql\drivers\psql\qsql_psql.cpp:626: error: 'PQresultStatus' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp:627: error: 'PGRES_COMMAND_OK' was not d
eclared in this scope
......\sql\drivers\psql\qsql_psql.cpp:627: error: 'PGRES_TUPLES_OK' was not de
clared in this scope
......\sql\drivers\psql\qsql_psql.cpp:628: error: 'PQgetvalue' was not declare
d in this scope
......\sql\drivers\psql\qsql_psql.cpp:669: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp: In destructor 'virtual QPSQLDriver::~QP
SQLDriver()':
......\sql\drivers\psql\qsql_psql.cpp:703: error: 'PQfinish' was not declared
in this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual bool QPSQLD
river::open(const QString&, const QString&, const QString&, const QString&, int,
const QString&)':
......\sql\drivers\psql\qsql_psql.cpp:780: error: 'PQconnectdb' was not declar
ed in this scope
......\sql\drivers\psql\qsql_psql.cpp:781: error: 'PQstatus' was not declared
in this scope
......\sql\drivers\psql\qsql_psql.cpp:781: error: 'CONNECTION_BAD' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp:784: error: 'PQfinish' was not declared
in this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual void QPSQLD
river::close()':
......\sql\drivers\psql\qsql_psql.cpp:810: error: 'PQfinish' was not declared
in this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual bool QPSQLD
river::beginTransaction()':
......\sql\drivers\psql\qsql_psql.cpp:828: error: 'PQexec' was not declared in
this scope
......\sql\drivers\psql\qsql_psql.cpp:829: error: 'PQresultStatus' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp:829: error: 'PGRES_COMMAND_OK' was not d
eclared in this scope
......\sql\drivers\psql\qsql_psql.cpp:830: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:835: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual bool QPSQLD
river::commitTransaction()':
......\sql\drivers\psql\qsql_psql.cpp:845: error: 'PQexec' was not declared in
this scope
......\sql\drivers\psql\qsql_psql.cpp:856: error: 'PQcmdStatus' was not declar
ed in this scope
......\sql\drivers\psql\qsql_psql.cpp:859: error: 'PQresultStatus' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp:859: error: 'PGRES_COMMAND_OK' was not d
eclared in this scope
......\sql\drivers\psql\qsql_psql.cpp:860: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:865: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual bool QPSQLD
river::rollbackTransaction()':
......\sql\drivers\psql\qsql_psql.cpp:875: error: 'PQexec' was not declared in
this scope
......\sql\drivers\psql\qsql_psql.cpp:876: error: 'PQresultStatus' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp:876: error: 'PGRES_COMMAND_OK' was not d
eclared in this scope
......\sql\drivers\psql\qsql_psql.cpp:879: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:882: error: 'PQclear' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual QString QPS
QLDriver::formatValue(const QSqlField&, bool) const':
......\sql\drivers\psql\qsql_psql.cpp:1179: error: 'PQescapeBytea' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'virtual bool QPSQLD
river::isOpen() const':
......\sql\drivers\psql\qsql_psql.cpp:1223: error: 'PQstatus' was not declared
in this scope
......\sql\drivers\psql\qsql_psql.cpp:1223: error: 'CONNECTION_OK' was not dec
lared in this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'bool QPSQLDriver::s
ubscribeToNotificationImplementation(const QString&)':
......\sql\drivers\psql\qsql_psql.cpp:1244: error: 'PQsocket' was not declared
in this scope
......\sql\drivers\psql\qsql_psql.cpp:1249: error: 'PQexec' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:1250: error: 'PQresultStatus' was not de
clared in this scope
......\sql\drivers\psql\qsql_psql.cpp:1250: error: 'PGRES_COMMAND_OK' was not
declared in this scope
......\sql\drivers\psql\qsql_psql.cpp: In member function 'bool QPSQLDriver::u
nsubscribeFromNotificationImplementation(const QString&)':
......\sql\drivers\psql\qsql_psql.cpp:1281: error: 'PQexec' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:1282: error: 'PQresultStatus' was not de
clared in this scope
......\sql\drivers\psql\qsql_psql.cpp:1282: error: 'PGRES_COMMAND_OK' was not
declared in this scope
......\sql\drivers\psql\qsqlpsql.cpp: In member function 'void QPSQLDriver::
q_handleNotification(int)':
......\sql\drivers\psql\qsql_psql.cpp:1305: error: 'PQconsumeInput' was not de
clared in this scope
......\sql\drivers\psql\qsql_psql.cpp:1307: error: 'PGnotify' was not declared
in this scope
......\sql\drivers\psql\qsql_psql.cpp:1307: error: 'notify' was not declared i
n this scope
......\sql\drivers\psql\qsql_psql.cpp:1308: error: 'PQnotifies' was not declar
ed in this scope
NMAKE : fatal error U1077: 'G:\Qt\mingw\bin\g++.EXE' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"G:\Program Files\Microsoft Visual Studio 9.0\VC\bin
\nmake.exe"' : return code '0x2'
Stop.

0

G:\Program Files\Microsoft Visual Studio 9.0\VC\bin; G:\Program Files\PostgreSQL\9.0\include

w zmiennej Path mam min takie ściezki więc

......\sql\drivers\psql\qsql_psql.cpp:58:22: error: libpq-fe.h: No such file o
r directory
......\sql\drivers\psql\qsql_psql.cpp:59:23: error: pg_config.h: No such file
or directory

te pliki powinny być chyba dostępne bo są tu
G:\Program Files\PostgreSQL\9.0\include

0

hmmmm...cóż,sprawdźmy taki trick:
1.Czy komenda qmake -o Makefile "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib\ms\libpq.lib" psql.pro tworzy ci projekt qt?Jeśli nie to masz duży problem,jeśli tak idź do 2 i dalej
2.Zakładam,że masz integrację visuala z qt.Otwórz zatem projekt psql.pro korzystając z opcji "open solution from pro file"
3.Upewnij się,że w ustawieniach visuala masz podane ścieżki do headerów oraz liba postgresa
4.Zapuść build release,i trzymaj kciuki

0

pod jakim systemem to kompilujesz i pod jaką architekturę ?

1 użytkowników online, w tym zalogowanych: 0, gości: 1, botów: 0