Qmake problems



  • Hello!

    I have a problem. Need to build a postgreSQL driver for Windows XP.
    Help says:
    cd %QTDIR%\src\plugins\sqldrivers\psql
    qmake -o Makefile "INCLUDEPATH+=C:\psql\include" "LIBS+=C:\psql\lib" psql.pro
    make

    but when I write it in command line it says that qmake is not a command. What can be wrong with it?



  • I guess you have not set the correct path and environment variable for Qt.



  • how do I have to set them?
    My QT is installed in D:\QtSdk.



  • on cmd line:
    @set PATH=D:\QtSdk\bin;%PATH%@



  • I have done it, but it did not help...(
    any other ideas?
    or can anyone write it in the right order in cmd and then copy-paste it here? many thanks.



  • it is in the right order. Are you sure Qt is installed in D:\QtSdk? is where bin folder with qmake.exe? If not, find where the qmake.exe is, and replace D:\QtSdk\bin from example above....



  • thanks. done that. but now it says "cannot find file psql.pro" although it is in D:\QtSdk\QtSources\4.7.4\src\plugins\sqldrivers\psql. how do i have to set %QTDIR%?



  • [quote author="AFI4ever" date="1329756880"]thanks. done that. but now it says "cannot find file psql.pro" although it is in D:\QtSdk\QtSources\4.7.4\src\plugins\sqldrivers\psql. how do i have to set %QTDIR%? [/quote]

    for setting QTDIR look this tutorial a nice step by step tutorial

    http://sector.ynet.sk/qt4-tutorial/preparations.html



  • Hi, you need run this under environment of QT, please choose menu:Qt SDk->Desktop->Qt4.7.x For MingW or MSVC2008... this will open a CMD window,then do what the helper mentioned above.

    Or, You need add a new environment QTDIR,then add $QTDIR\bin into env variable Path,then open a CMD window, qmake... make...(or nmake...)



  • I have set up QTDIR PATH and qmake works well but after typing in cmd
    qmake -o Makefile “INCLUDEPATH+=C:\psql\include” “LIBS+=C:\psql\lib” psql.pro
    it still says Cannot find file: psql.pro
    although there is file psql.pro in folder QTDIR\src\plugins\sqldrivers\psql

    what can cause this problem?



  • "INCLUDEPATH+=C:\psql\include” “LIBS+=C:\psql\lib"
    this should be moved into psql.pro file. my point of view!
    just do :qmake
    make


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.