Unsolved Postgres for android
-
Hi. I am trying to create the postgres driver for android. I found complete instructions here. But in the final step where i run qmake and then make install i get the following error: ../../../sql/drivers/psql/qsql_psql.cpp:133:18: error: ‘PostgreSQL’ is not a member of ‘QSqlDriver’
Any idea what is going wrong?
-
The above error was that i used for the compilation qt 5.2.1 but the qtbase was 5.5.1. So i used the qt qmake that is located in my home folder under Qt5.5.1/5.5/android_armv7/bin/qmake. But now i am facing another problem. The compiler says: error: cannot find -lpq.
Is there anything that i can do to solve this problem?
Thanks in advance! -
Hi,
Can you show the qmake command and option you used to build the plugin ?
-
If i understand you want this:
qmake "INCLUDEPATH+=/path/to/postgresql-9.4.1/src/interfaces/libpq /path/to/postgresql-9.4.1/src/include" "LIBS+=-L/path/to/postgresql-9.4.1/src/interfaces/libpq/ -lpq"This is what the qt wiki says to use. I've just write the corrent paths in the /path/to. I've also tried qmake from qt folder in the file system for android armv but still nothing. Only qmake from gcc worked perfectly.
-
@NickV I guess the library isn't compiled for Android, right?
-
Right! When i' ve tried the qmake for android multiple error shown. Only gmake for gcc worked perfectly! Ant suggestion?
-
@NickV You need to build PostgreSQL client library for Android first. Read PostgreSQL documentation to find out how.
-
Thanks for your reply. I will try it and i will inform you about my progress.