Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Compiling projects
Forum Updated to NodeBB v4.3 + New Features

Compiling projects

Scheduled Pinned Locked Moved Installation and Deployment
21 Posts 5 Posters 11.4k 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.
  • B Offline
    B Offline
    bergo.torino
    wrote on last edited by
    #4

    bq. I try to compile a project made by an other one. I’ve installed QT Creator 2.0.1 and mingw 4.5.2 to build it.

    Have you installed Qt?

    It's compiling - mostly I'm slacking off ;)

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexspin
      wrote on last edited by
      #5

      I've download "Qt SDK for Windows" from Qt site. I try to make a test project with a window and work but for that project I can't build.

      I've to install some others things?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Scylla
        wrote on last edited by
        #6

        Did you execute qmake again after setting "QT += xml” in the pro file?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          alexspin
          wrote on last edited by
          #7

          "QT += xml" was originally written in the pro file.
          this is what I've done:

          • install the QT SDK
          • install mingw
          • run configure.exe under "C:\Qt\2010.05\qt"
          • open project
          • build->run qmake and it return this messages:

          Starting: "c:/qt/2010.05/qt/bin/qmake.exe" C:/Develop/TEST/J6PROJ/J6PROJ.pro -r -spec win32-g++ c:\Qt\2010.05\qt\bin\rcc.exe: File does not exist '..\J6PROJ.qrc'

          c:\Qt\2010.05\qt\bin\rcc.exe: File does not exist '..\J6PROJ.qrc'

          The process "c:/qt/2010.05/qt/bin/qmake.exe" exited normally.

          And this warning:
          Qmake does not support build directories below the source directory

          • After that I build project build->Build Project and obtain that errors.

          Thanks.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #8

            it's not the "QT += xml" if the linker does not find the libs.
            can you please post your pro file content?

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • G Offline
              G Offline
              giesbert
              wrote on last edited by
              #9

              Hi alexspin,

              Why do you run configure.exe if you don't build qt? It overwrites some files that are used by qmake...
              Also, I think the sdk brings a mingw by itself, right?

              Nokia Certified Qt Specialist.
              Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

              1 Reply Last reply
              0
              • A Offline
                A Offline
                alexspin
                wrote on last edited by
                #10

                Here the pro file:

                @

                -------------------------------------------------

                Project created by QtCreator 2009-07-02T09:25:39

                -------------------------------------------------

                QT += xml
                TARGET = MNCF
                TEMPLATE = app
                DEPENDPATH += .
                INCLUDEPATH += ./COM
                INCLUDEPATH += ./DIO
                QMAKE_LIBDIR += ../COM
                QMAKE_LIBDIR += ../DIO
                SOURCES += main.cpp
                mainwindow.cpp
                com.cpp
                db.cpp
                rf.cpp
                pf.cpp
                pmf.cpp
                wf.cpp
                cf.cpp
                kf.cpp
                kb.cpp
                jp.cpp
                pfm.cpp
                ppfm.cpp
                mf.cpp
                bcf.cpp
                stf.cpp
                lng.cpp
                jc.cpp
                HEADERS += mainwindow.h
                com.h
                db.h
                rf.h
                pf.h
                pmf.h
                wf.h
                cf.h
                kf.h
                kb.h
                jp.h
                pfm.h
                ppfm.h
                mf.h
                bcf.h
                stf.h
                lng.h
                jc.h
                FORMS += mainwindow.ui
                rf.ui
                pf.ui
                pmf.ui
                wf.ui
                cf.ui
                kf.ui
                pfm.ui
                ppfm.ui
                mf.ui
                bcf.ui
                stf.ui
                OTHER_FILES += big
                imm
                a.jpg
                med
                imm.jpg
                RESOURCES += J6PROJ.qrc
                LIBS += -lqextserialport
                LIBS += -lEIODll
                unix:DEFINES = TTY_POSIX
                win32:DEFINES = TTY_WIN
                QWT_DLL
                QT_DLL
                win32:RC_FILE = app.rc
                @

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  andre
                  wrote on last edited by
                  #11

                  Your steps 2 and 3 (installing mingw and running configure) are likely the cause of your problems. The SDK installer sets it all up for you, ready to use. I would re-install the SKD; that would be quicker than trying to fix the issue manually I think.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    alexspin
                    wrote on last edited by
                    #12

                    Thanks Andre and Gerolf. I try to unistall and reinstall the SDK and test.

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      giesbert
                      wrote on last edited by
                      #13

                      as you use ui stuff, you should have this in the beginning:

                      @
                      QT += core gui xml
                      @

                      Nokia Certified Qt Specialist.
                      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        andre
                        wrote on last edited by
                        #14

                        By default, QT already has at least core (and I believe gui too). So just

                        @
                        QT += xml
                        @

                        should be enough.

                        1 Reply Last reply
                        0
                        • ? This user is from outside of this forum
                          ? This user is from outside of this forum
                          Guest
                          wrote on last edited by
                          #15

                          IMO, this sounds like the path doesn't contain the route to the libraries, so they aren't being found. If this is the case, maybe using -Lfulllibroute instead of -llibname could be useful (-L full lib route, -l library name). Also, I don't know which $PATH(s) mingw's ld looks into...

                          --

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            alexspin
                            wrote on last edited by
                            #16

                            I've uninstall Qt sdk and minigw and reinstall only Qt sdk.
                            I've load my project, run qmake and build project obtaining a lot of error like:

                            _undefined reference to __gxx_personality_sj0'_ _undefined reference to Unwind_SjLj_Register'
                            _undefined reference to _Unwind_SjLj_Unregister'_ _undefined reference to Unwind_SjLj_Resume'

                            It seems like a non correct library link.

                            1 Reply Last reply
                            0
                            • ? This user is from outside of this forum
                              ? This user is from outside of this forum
                              Guest
                              wrote on last edited by
                              #17

                              After such a tremendous software removal and reinstallation... a full clean build is recommended, IMHO.

                              --

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                alexspin
                                wrote on last edited by
                                #18

                                I've done it but I obtained the same errors.

                                1 Reply Last reply
                                0
                                • A Offline
                                  A Offline
                                  alexspin
                                  wrote on last edited by
                                  #19

                                  I have reinstalled the Qt SDK and after compile my project I obtained this errors:

                                  ./release\moc_mainwindow.o:moc_mainwindow.cpp:(.text+0xb7): undefined reference to `__gxx_personality_sj0'

                                  ./release\moc_mainwindow.o:moc_mainwindow.cpp:(.text+0xca): undefined reference to `_Unwind_SjLj_Register'

                                  ./release\moc_mainwindow.o:moc_mainwindow.cpp:(.text+0x113): undefined reference to `_Unwind_SjLj_Unregister'

                                  ./release\moc_mainwindow.o:moc_mainwindow.cpp:(.text+0xa76): undefined reference to `_Unwind_SjLj_Resume'

                                  for each file.

                                  How can manage this? Which library contain that reference?

                                  Please help!

                                  1 Reply Last reply
                                  0
                                  • A Offline
                                    A Offline
                                    alexspin
                                    wrote on last edited by
                                    #20

                                    Ok, I've done it.
                                    I've installed the SDK that the project was made, 2009.03, and with this the project compile correctly.

                                    Why?
                                    Any ideas?

                                    1 Reply Last reply
                                    0
                                    • ? This user is from outside of this forum
                                      ? This user is from outside of this forum
                                      Guest
                                      wrote on last edited by
                                      #21

                                      2 years ago... too many changes in Qt since that moment in time? Couldn't say, as i recently joined this page...

                                      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