Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qt 4.8.5 with PostgreSQL 9.1 !!
Forum Updated to NodeBB v4.3 + New Features

Qt 4.8.5 with PostgreSQL 9.1 !!

Scheduled Pinned Locked Moved QML and Qt Quick
12 Posts 3 Posters 4.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NandiniN
    wrote on last edited by
    #1

    Hello kindly help...

    I have PostgreSQL 9.1 and Qt Designer both are running very fine individually.. Please help me to CONNECT THESE TWO!! Which loaders should i use,why should i do that..how to set the path,where to set etc

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by
      #2

      Hi,

      Qt Designer is a UI designer there isn't DB connection.

      If you mean how to connect Qt application with DB, read "here":http://qt-project.org/doc/qt-5.1/qtdoc/topics-data-storage.html#sql-support-in-qt for an overview and "here":http://qt-project.org/doc/qt-5.1/qtsql/sql-driver.html#qpsql-for-postgresql-version-7-3-and-above for PostgreSQL related information

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0
      • N Offline
        N Offline
        NandiniN
        wrote on last edited by
        #3

        Following your link, i am not able to do 'nmake'..it gives me fatal error NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0
        VC\BIN\cl.EXE"' : return code '0x2'
        Stop.

        what is wrong?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          Wich version of Qt are you using? What Operaing System?

          If you're using Windows/MinGW you shall follow Unix instruction to build PSQL driver

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          1 Reply Last reply
          0
          • N Offline
            N Offline
            NandiniN
            wrote on last edited by
            #5

            Qt 4.8.5 .Windows 7 ,64bit. I have been using only Qt designer and i run c++ code on VS2008. I haven't installed Qt Creator yet, is it giving me problem?

            Installed MinGW 3.1.0 and tried following this https://sites.google.com/site/qxormpostgres/generar-driver-postgres-qt
            got struck in 9yh step,i am not able to generate '.a' files !

            Please elaborate on this "If you’re using Windows/MinGW you shall follow Unix instruction to build PSQL driver".

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mcosta
              wrote on last edited by
              #6

              Hi,

              I means "What Qt build are you using"? The answer is Qt-VisualStudio.

              You can't mix compiler. You must use VisualStudio.

              Anyway, "here":http://msdn.microsoft.com/en-us/library/xsyc3e16(v=vs.110).aspx you can read that return code 0x2 probably means that your Makefile is incorrect.
              Is the cl.exe PATH correct?

              Please post you configuration and the prompt command you used to run qmake

              Once your problem is solved don't forget to:

              • Mark the thread as SOLVED using the Topic Tool menu
              • Vote up the answer(s) that helped you to solve the issue

              You can embed images using (http://imgur.com/) or (http://postimage.org/)

              1 Reply Last reply
              0
              • N Offline
                N Offline
                NandiniN
                wrote on last edited by
                #7

                I have no idea about this cl.exe !

                came up with new issue-
                C:\Qt\4.8.5>C:\Qt\4.8.5\src\plugins\sqldrivers\psql

                C:\Qt\4.8.5\src\plugins\sqldrivers\psql>qmake Makefile "INCLUDEPATH+=C:/Program
                Files/PostgreSQL/9.2/include" "LIBS+=C:/Program Files/PostgreSQL/9.2/lib/libpq.a
                " psql.pro
                i get something like this -

                c:\Qt\4.8.5\src\plugins\sqldrivers\psql\Makefile:9: Parse Error ('first: debug')

                Error processing project file: Makefile

                C:\Qt\4.8.5\src\plugins\sqldrivers\psql>

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mcosta
                  wrote on last edited by
                  #8

                  Hi

                  from
                  @qmake Makefile “INCLUDEPATH+=C:/Program Files/PostgreSQL/9.2/include” “LIBS+=C:/Program Files/PostgreSQL/9.2/lib/libpq.a “ psql.pro
                  @

                  delete Makefile word

                  @
                  qmake “INCLUDEPATH+=C:/Program Files/PostgreSQL/9.2/include” “LIBS+=C:/Program Files/PostgreSQL/9.2/lib/libpq.a“ psql.pro
                  @

                  Once your problem is solved don't forget to:

                  • Mark the thread as SOLVED using the Topic Tool menu
                  • Vote up the answer(s) that helped you to solve the issue

                  You can embed images using (http://imgur.com/) or (http://postimage.org/)

                  1 Reply Last reply
                  0
                  • N Offline
                    N Offline
                    NandiniN
                    wrote on last edited by
                    #9

                    C:\Qt\4.8.5\src\plugins\sqldrivers\psql>qmake "INCLUDEPATH+=C:/Program Files/Pos
                    tgreSQL/9.2/include" "LIBS+=C:/Program Files/PostgreSQL/9.2/lib/libpq.a" psql.pr
                    o
                    Cannot find file: Files\PostgreSQL\9.2\includeö.
                    Cannot find file: Files\PostgreSQL\9.2\lib\libpq.aô.

                    C:\Qt\4.8.5\src\plugins\sqldrivers\psql>

                    how to generate this ".a" files?

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mcosta
                      wrote on last edited by
                      #10

                      Hi,

                      as you can see, there is a problem with path containing spaces; try to prefix a '' character to each space.

                      For example

                      @
                      qmake “INCLUDEPATH+=C:/Program\ Files/PostgreSQL/9.2/include” “LIBS+=C:/Program\ Files/PostgreSQL/9.2/lib/libpq.a“ psql.pro@

                      Once your problem is solved don't forget to:

                      • Mark the thread as SOLVED using the Topic Tool menu
                      • Vote up the answer(s) that helped you to solve the issue

                      You can embed images using (http://imgur.com/) or (http://postimage.org/)

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        Hi,

                        The quickest way to avoid problems with LIBS paths on windows is to either avoid using spaces at all or use the 8.3 naming

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          mcosta
                          wrote on last edited by
                          #12

                          Hi,

                          to get 8.3 names you can type on Windows Command Prompt

                          @
                          dir /X
                          @

                          Once your problem is solved don't forget to:

                          • Mark the thread as SOLVED using the Topic Tool menu
                          • Vote up the answer(s) that helped you to solve the issue

                          You can embed images using (http://imgur.com/) or (http://postimage.org/)

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved