crossplatform.ru

Здравствуйте, гость ( Вход | Регистрация )

> QT4.6 +PostgreQAL, help
mettamo
  опции профиля:
сообщение 2.6.2010, 11:12
Сообщение #1


Студент
*

Группа: Участник
Сообщений: 43
Регистрация: 22.10.2009
Пользователь №: 1173

Спасибо сказали: 0 раз(а)




Репутация:   0  


Здравствуйте не получается скомпилить драйвер
/usr/include/postgresql - сдесь находятся заголовочники
/home/artem/qtsdk-2010.02/qt/src/plugins/sqldrivers/psql - плагин

пробовал так
qmake-qt4 -o Makefile "INCLUDEPATH+=/usr/include/postgresql" "LIBS+=/usr/include/postgresql/8.4/server/libpq/libpq.h" psql.pro
потом так
qmake-qt4 -o Makefile "INCLUDEPATH+=/usr/include/postgresql/8.4/server/libpql" "LIBS+=/usr/include/postgresql/8.4/server/libpq/libpq.h" psql.pro
много вариантов перепробовал чтоб он видел заголовочники

постоянно выдает
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:14:27: error: nodes/pg_list.h: Нет такого файла или каталога
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:15:26: error: libpq/pqcomm.h: Нет такого файла или каталога
In file included from /usr/include/postgresql/8.4/server/libpq/libpq.h:21:
/usr/include/postgresql/8.4/server/libpq/libpq/libpq-be.h:74:52: error: /usr/include/postgresql/8.4/server/utils: Нет такого файла или каталога
In file included from /usr/include/postgresql/8.4/server/libpq/libpq.h:20:
/usr/include/postgresql/8.4/server/libpq/lib/stringinfo.h:108: error: ‘va_list’ has not been declared
In file included from /usr/include/postgresql/8.4/server/libpq/libpq/libpq-be.h:71,
from /usr/include/postgresql/8.4/server/libpq/libpq.h:21:
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:66: error: expected initializer before ‘*’ token
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:71: warning: ‘read_pg_database_line’ initialized and declared ‘extern’
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:71: error: ‘FILE’ was not declared in this scope
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:71: error: ‘fp’ was not declared in this scope
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:71: error: expected primary-expression before ‘char’
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:71: error: ‘Oid’ was not declared in this scope
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:71: error: ‘dboid’ was not declared in this scope
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:72: error: ‘Oid’ was not declared in this scope
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:72: error: ‘dbtablespace’ was not declared in this scope
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:72: error: ‘TransactionId’ was not declared in this scope
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:72: error: ‘dbfrozenxid’ was not declared in this scope
/usr/include/postgresql/8.4/server/libpq/libpq/hba.h:72: error: initializer expression list treated as compound expression
In file included from /usr/include/postgresql/8.4/server/libpq/libpq/libpq-be.h:72,
from /usr/include/postgresql/8.4/server/libpq/libpq.h:21:
/usr/include/postgresql/8.4/server/libpq/libpq/pqcomm.h:44: error: redefinition of ‘struct sockaddr_storage’
/usr/include/bits/socket.h:188: error: previous definition of ‘struct sockaddr_storage’
/usr/include/postgresql/8.4/server/libpq/libpq/pqcomm.h:65: error: ‘ACCEPT_TYPE_ARG3’ does not name a type
/usr/include/postgresql/8.4/server/libpq/libpq/pqcomm.h:100: error: ‘uint32’ does not name a type
/usr/include/postgresql/8.4/server/libpq/libpq/pqcomm.h:102: error: ‘ProtocolVersion’ does not name a type
/usr/include/postgresql/8.4/server/libpq/libpq/pqcomm.h:111: error: ‘uint32’ does not name a type
/usr/include/postgresql/8.4/server/libpq/libpq/pqcomm.h:130: error: ‘ProtocolVersion’ does not name a type
/usr/include/postgresql/8.4/server/libpq/libpq/pqcomm.h:163: error: ‘uint32’ does not name a type
/usr/include/postgresql/8.4/server/libpq/libpq/pqcomm.h:179: error: ‘MsgType’ does not name a type
/usr/include/postgresql/8.4/server/libpq/libpq/pqcomm.h:180: error: ‘uint32’ does not name a type
/usr/include/postgresql/8.4/server/libpq/libpq/pqcomm.h:181: error: ‘uint32’ does not name a type
In file included from /usr/include/postgresql/8.4/server/libpq/libpq.h:21:
/usr/include/postgresql/8.4/server/libpq/libpq/libpq-be.h:110: error: ‘ProtocolVersion’ does not name a type
/usr/include/postgresql/8.4/server/libpq/libpq/libpq-be.h:125: error: ISO C++ forbids declaration of ‘List’ with no type
/usr/include/postgresql/8.4/server/libpq/libpq/libpq-be.h:125: error: expected ‘;’ before ‘*’ token
/usr/include/postgresql/8.4/server/libpq/libpq/libpq-be.h:138: error: ‘TimestampTz’ does not name a type
/usr/include/postgresql/8.4/server/libpq/libpq/libpq-be.h:179: error: ‘ProtocolVersion’ does not name a type
make: *** [libqsqlpsql.so] Ошибка 1

смотрел сами заголовочники такое ощущение что папки перемешаны, что делать?
Перейти в начало страницы
 
Быстрая цитата+Цитировать сообщение
 
Начать новую тему
Ответов
mettamo
  опции профиля:
сообщение 2.6.2010, 20:09
Сообщение #2


Студент
*

Группа: Участник
Сообщений: 43
Регистрация: 22.10.2009
Пользователь №: 1173

Спасибо сказали: 0 раз(а)




Репутация:   0  


в файле *.pro дописываю
QTPLUGIN += psql

в исходнике
Q_IMPORT_PLUGIN(psql);

пишет при компиляции collect2: ld returned 1 exit status

g++ -Wl,-O1 -o DATABASE main.o mainwindow.o moc_mainwindow.o -L/usr/lib -lQtGui -lQtCore -lpthread
main.o: In function `global constructors keyed to main':
main.cpp:(.text+0x1): undefined reference to `qt_plugin_instance_psql()'
collect2: ld returned 1 exit status
make: *** [DATABASE] Ошибка 1
Перейти в начало страницы
 
Быстрая цитата+Цитировать сообщение

Сообщений в этой теме
- mettamo   QT4.6 +PostgreQAL   2.6.2010, 11:12
- - Litkevich Yuriy   Цитата(mettamo @ 2.6.2010, 15:12) LIBS+=/...   2.6.2010, 15:10
- - mettamo   а какую библиотеку? вроде собрал появился файл li...   2.6.2010, 19:28
- - mettamo   в файле *.pro дописываю QTPLUGIN += psql в исходн...   2.6.2010, 20:09
- - Litkevich Yuriy   mettamo, ты что статически Qt собирал?   2.6.2010, 23:37
- - mettamo   нет   2.6.2010, 23:55
- - Litkevich Yuriy   тогда всё это добро в файле проекта и main.cpp не ...   3.6.2010, 0:04
- - mettamo   QSqlDatabase db; db.addDatabase("QPSQL...   3.6.2010, 0:21
- - mettamo   db.lastError().text() пишет, что драйвер не загруж...   3.6.2010, 6:23
- - Litkevich Yuriy   mettamo, бинари самой СУБД должны быть доступны че...   3.6.2010, 11:35
- - mettamo   в демке подключается...   3.6.2010, 12:09
- - Litkevich Yuriy   Цитата(mettamo @ 3.6.2010, 16:09) в демке...   3.6.2010, 13:27
- - mettamo   из файлового менеджера но в принципе демка компил...   3.6.2010, 13:53
- - Litkevich Yuriy   а в демку ты точно такие же данные вводишь, в част...   3.6.2010, 15:10
- - mettamo   да   3.6.2010, 17:42
- - mettamo   в чем может быть дело?   3.6.2010, 22:56
- - Litkevich Yuriy   Похоже из-за этого: db.addDatabase("QPSQL...   3.6.2010, 23:09
- - mettamo   блин заработало ура!!!! большое сп...   3.6.2010, 23:28


Быстрый ответОтветить в данную темуНачать новую тему
Теги
Нет тегов для показа


1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0




RSS Текстовая версия Сейчас: 25.4.2024, 11:29