Results 1 to 9 of 9

Thread: Qt Creator fail to compile !

  1. #1
    Join Date
    Mar 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Qt Creator fail to compile !

    I've just install Qt Creator 1.3.1 from this Qt website
    http://qt.nokia.com/downloads/qt-cre...ry-for-windows
    I'm using Windows 7 64 bit. I followed the Qt Creator Manual to create a GUI application, however; it did not compiled successfully. I got these error messages from the compiler output:
    Running build steps for project example...
    Starting: c:/qt/2010.02.1/qt/bin/qmake.exe C:/Users/chan/Desktop/Qt4/example/example.pro -spec win32-g++ -r
    Exited with code 0.
    Starting: C:/Qt/2010.02.1/mingw/bin/mingw32-make.exe -w
    mingw32-make: Entering directory `C:/Users/chan/Desktop/Qt4/example'
    C:/Qt/2010.02.1/mingw/bin/mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory `C:/Users/chan/Desktop/Qt4/example'
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,console -o debug\example.exe debug/main.o debug/mainwindow.o debug/moc_mainwindow.o -L"c:\Qt\2010.02.1\qt\lib" -lopengl32 -lglu32 -lgdi32 -luser32 -lQtDBusd -lQtTestd4 -lQtOpenGLd4 -lQtGuid4 -lQtCored4
    mingw32-make[1]: Leaving directory `C:/Users/chan/Desktop/Qt4/example'
    mingw32-make: Leaving directory `C:/Users/chan/Desktop/Qt4/example'
    c:/qt/2010.02.1/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lQtDBusd
    collect2: ld returned 1 exit status
    mingw32-make[1]: *** [debug\example.exe] Error 1
    mingw32-make: *** [debug] Error 2
    Exited with code 2.
    Error while building project example
    When executing build step 'Make'
    And I have no idea what's wrong ! Anyone could give me a hint that where did I miss ? Thank you !

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Qt Creator fail to compile !

    c:/qt/2010.02.1/mingw/bin/../lib/gcc/mingw32/4.4.0/../../../../mingw32/bin/ld.exe: cannot find -lQtDBusd
    It looks like your Qt is not configured with QtDBus module.
    This project needs the DBus modules to run.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Mar 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Creator fail to compile !

    Thanks high_flyer ! Can you show me how to configure QtDBus module ? I'm very newbie with GUI programming !

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt Creator fail to compile !

    Where did you take this example from?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Mar 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Creator fail to compile !

    Example is the name of my project. I've just created a "Qt4 Gui Application" and click compiled button( which looked like a "play" button ). I did not modify anything from the code that given by Qt Creator.
    I have 1 header file named "mainwindow.h" and 2 source files named "mainwindow.cpp" and "main.cpp" plus a mainwindow.ui.

  6. #6
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Qt Creator fail to compile !

    Go to your *.pro file and delete dbus out ot the QT variable. Then rerun qmake and build again.

  7. #7
    Join Date
    Mar 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Creator fail to compile !

    Thanks Lykurg ! It worked perfectly. And would you mind explaining why do I have to delete that "dbus" out of the QT variable ?

  8. #8
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Qt Creator fail to compile !

    The right question is: Why do you have put it there if you don't need it? With the QT variable you define which (Qt-)libraries Qt should link against your application. So if you don't need a library or if you don't have such a library don't write it there.

  9. #9
    Join Date
    Mar 2010
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt Creator fail to compile !

    Thanks for making it clear.

Similar Threads

  1. Replies: 2
    Last Post: 15th February 2010, 15:07
  2. Replies: 6
    Last Post: 28th July 2009, 14:31
  3. Fail with new GCC and backward compatibility
    By estanisgeyer in forum General Programming
    Replies: 0
    Last Post: 4th July 2009, 14:02
  4. Fail to compile something rely on Qt4
    By kfc123 in forum Installation and Deployment
    Replies: 1
    Last Post: 2nd July 2009, 20:11
  5. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.