Qt Postgresql driver build failed
I downloaded zip archive of the binaries from Postgresql website, unpacked it. Then found .pro file in "...\src\plugins\sqldrivers\psql". When I tried to built postgresql driver (qmake and then nmake ofc) I get this error messages:
LINK : fatal error LNK1104: cannot open file ''C:/CL/pgsql/lib.obj'' NMAKE : fatal error U1077: "C:\Program Files (x86)\Microsoft Visual Studio 9.0\V C\BIN\link.EXE": return code "0x450" Stop. NMAKE : fatal error U1077: "C:\Program Files (x86)\Microsoft Visual Studio 9.0\V C\BIN\nmake.exe": return code "0x2"
What is lib.obj here? There definently no such files in postgres zip archive (I followed instruction and there said that files in posgresql /lib and /include enough ) where could it be? Or, maybe, I missed something?
Here's my psql.pro file
TARGET = qsqlpsql SOURCES = main.cpp INCLUDEPATH += "C:/CL/pgsql/include" LIBS+="C:/CL/pgsql/lib" include(../../../sql/drivers/psql/qsql_psql.pri) include(../qsqldriverbase.pri)
You might want C:/CL/pgsql/lib/libpq.lib instead, referring to the specific file of interest.
I haven't used QMake in ages, but that's how it looks from the error.
(See RobbieE's answer for the docs link and explanation).
LIBS refers to both directories and single files depending on the switches
See the documentation for a description on how to use it.