Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problem Building Qt C++ Examples
Forum Updated to NodeBB v4.3 + New Features

Problem Building Qt C++ Examples

Scheduled Pinned Locked Moved General and Desktop
13 Posts 5 Posters 14.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.
  • B Offline
    B Offline
    blex
    wrote on last edited by
    #3

    [quote author="Alexander Kuchumov" date="1291307762"]Try to set env PATH to directory with qtdll's.[/quote]

    It seems that compiler cannot find libs, not dlls. Maybe, something wrong with *.a file location (or how iit is called in mingw), spaces in the path or LIB value in *.pro file?


    Oleksiy Balabay

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alexander
      wrote on last edited by
      #4

      blex, yes, path to libs

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JoDi
        wrote on last edited by
        #5

        Thanks all for your replies. Unfortunatly, it didn't help me any further.

        I wanted to evaluate Qt, and given the fact that after a default installation on XP I can't build the included examples is a bit frustrating and definatly not what I expected. So currently thumbs down on Qt, but I don't give up yet!

        In the environment settings, I've added C:\Qt\2010.05\qt\bin to the PATH. Further I noticed that in Projects -> Run settings one can make also change the build, clean and environment settings, but I am not sure what to look for here what could be wrong...

        Any further help appreciated.

        1 Reply Last reply
        0
        • B Offline
          B Offline
          blex
          wrote on last edited by
          #6

          Please look at option

          @
          -L”c:Program FilesSQLXML 4.0bin”
          @

          in your output. I think it is a forum bug that no back-slash are present. It contains space in the directory name. Try to remove this path - I do not know where your environment got it.


          Oleksiy Balabay

          1 Reply Last reply
          0
          • B Offline
            B Offline
            blex
            wrote on last edited by
            #7

            I have just compile you example using QtCreator but from build 2010.01

            Instead of make try the IDE:

            • open project in QtCreator,
            • select the proper version of Qt (Tools - Options - Qt4 - Qt Versions - Default Qt version): in your case it should be c:\qt\2010.05\qt\bin\qmake.exe
            • Build - Run qmake
            • Build - Run

            Oleksiy Balabay

            1 Reply Last reply
            0
            • J Offline
              J Offline
              JoDi
              wrote on last edited by
              #8

              Hi Blex,

              Thanks! It was indeed related to the environment setting for lib ”c:\Program Files\SQLXML 4.0\bin”.

              Once I removed it from the environment settings I was able to build an run the examples.

              Thumps up again!

              1 Reply Last reply
              0
              • B Offline
                B Offline
                blex
                wrote on last edited by
                #9

                So, the resolution: Never use spaces in path to library files.


                Oleksiy Balabay

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kamalakshantv
                  wrote on last edited by
                  #10

                  Just noticed the topic header. If you can correct it - its Qt and not QT(Quick Time)

                  1 Reply Last reply
                  0
                  • O Offline
                    O Offline
                    osiris2600
                    wrote on last edited by
                    #11

                    I'm having the exact same problem and I cannot figure it out for the life of me. I went as far as to put the lib directory into the system path and I am still unable to compile the example applications.

                    Below is the compile output. I was able to get it to compile once. Then I took the lib dir out of the path to make sure that was the solution and I haven't been able to get it to compile since. I have no idea whats wrong and I'm pretty disappointed that the default installation does not work. Any help would be appreciated.

                    _Running build steps for project animatedtiles...
                    Configuration unchanged, skipping qmake step.
                    Starting: "C:/Qt4/2010.05/mingw/bin/mingw32-make.exe" -w
                    mingw32-make: Entering directory `C:/Qt4/2010.05/qt/examples/animation/animatedtiles'

                    C:/Qt4/2010.05/mingw/bin/mingw32-make -f Makefile.Debug all

                    mingw32-make[1]: Entering directory `C:/Qt4/2010.05/qt/examples/animation/animatedtiles'

                    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows -o debug\animatedtiles.exe tmp/obj/debug_shared/main.o tmp/obj/debug_shared/qrc_animatedtiles.o -L"c:\Qt4\2010.05\qt\lib" -L"C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib" -L"c:\Qt4\2010.05\qt\lib" -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4

                    mingw32-make[1]: Leaving directory `C:/Qt4/2010.05/qt/examples/animation/animatedtiles'

                    mingw32-make: Leaving directory `C:/Qt4/2010.05/qt/examples/animation/animatedtiles'

                    tmp/obj/debug_shared/main.o: In function `Z5qMainiPPc':

                    C:\Qt4\2010.05\qt\examples\animation\animatedtiles/main.cpp:136: undefined reference to `imp___ZN12QApplicationC1ERiPPci'_

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      JoDi
                      wrote on last edited by
                      #12

                      The problem appears to be caused by the lib C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib\

                      Please check your system properties -> Environment settings on your Windows machine. Likely there is a variable with name LIB listed and which has the value C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Lib. Delete this entry and try again to run qmake and to rebuild the application.

                      This was what caused my problem as well.

                      1 Reply Last reply
                      0
                      • O Offline
                        O Offline
                        osiris2600
                        wrote on last edited by
                        #13

                        Thanks, that got me a bit futher but then i ran into another known problem -> http://bugreports.qt.nokia.com/browse/QTCREATORBUG-1889

                        I was eventually able to get past this but why hasn't this been bug resolved? Should I reopen this bug? This is experience does not leave a good impression especially as a first time user.

                        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