Results 1 to 20 of 20

Thread: compilation error

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default compilation error

    Talk2amulya,
    i added those .prf files to my makefile and i compiled that application still it is giving same error. what might be the problem?

    Actualy i tried to give reply directly with ur last post but i am not able to write on the site,so i created new thread.plz excuse me.

    thank u.

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: compilation error

    did you try to install Qt in another directory/drive etc?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  3. #3
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    just now i am trying to do that.i will let u know after installing qt on another drive Spirit.

    thank u.

  4. #4
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    Spirit,
    Even after installing on different directory is also creating same problem.
    Qt Code:
    1. tmp/obj/debug_shared/hello.o(.text+0x158): In function `Z5qMainiPPc':
    2. F:/Qt/4.4.3/hello/hello.cpp:5: undefined reference to `_imp___ZN12QApplicationC1
    3. ERiPPci'
    4. tmp/obj/debug_shared/hello.o(.text+0x1ec):F:/Qt/4.4.3/hello/hello.cpp:6: undefin
    5. ed reference to `_imp___ZN6QLabelC1ERK7QStringP7QWidget6QFlagsIN2Qt10WindowTypeE
    6. E'
    7. tmp/obj/debug_shared/hello.o(.text+0x2b2):F:/Qt/4.4.3/hello/hello.cpp:8: undefin
    8. ed reference to `_imp___ZN12QApplication4execEv'
    9. tmp/obj/debug_shared/hello.o(.text+0x2cf):F:/Qt/4.4.3/hello/hello.cpp:8: undefin
    10. ed reference to `QApplication::~QApplication()'
    11. tmp/obj/debug_shared/hello.o(.text+0x2fe):F:/Qt/4.4.3/hello/hello.cpp:8: undefin
    12. ed reference to `QApplication::~QApplication()'
    13. tmp/obj/debug_shared/hello.o(.text$_ZN7QStringD1Ev[QString::~QString()]+0x20): I
    14. n function `ZSt3minIjERKT_S2_S2_':
    15. F:/Qt/4.4.3/hello/../include/QtCore/../../src/corelib/tools/qstring.h: undefined
    16. reference to `_imp___ZN7QString4freeEPNS_4DataE'
    17. tmp/obj/debug_shared/hello.o(.text$_ZN7QStringC1EPKc[QString::QString(char const
    18. *)]+0x19):F:/Qt/4.4.3/hello/../include/QtCore/../../src/corelib/tools/qstring.h:
    19. undefined reference to `_imp___ZN7QString16fromAscii_helperEPKci'
    20. /mingw/lib/libmingw32.a(main.o)(.text+0x106):main.c: undefined reference to `Win
    21. Main@16'
    22. collect2: ld returned 1 exit status
    23. mingw32-make[1]: *** [debug\hello.exe] Error 1
    24. mingw32-make[1]: Leaving directory `F:/Qt/4.4.3/hello'
    25. mingw32-make: *** [debug-all] Error 2
    To copy to clipboard, switch view to plain text mode 

    this is the problem,what should i do?

  5. #5
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: compilation error

    did you try to build Qt's examples?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  6. #6
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    Spirit,
    I am trying to compile this simple code:
    #include <QApplication>
    #include <QLabel>
    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);
    QLabel *label = new QLabel("Hello Qt!");
    label->show();
    return app.exec();
    }

    this simple application is not compiling then how can i expect examples will compile properly.

  7. #7
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: compilation error

    so, I would like to know: did you build Qt manually or installed already built Qt?
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  8. #8
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    I have not understood ur question properly.what i did is i uninstalled previously installed qt and again i installed qt in "F" directory by specifying MinGw path in sam "F" directory only.as i am windows user simply followed the instructions which i got after double clicking the qt software.

  9. #9
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: compilation error

    got it. so, try to build Qt by yourself using Qt's configure tool.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  10. #10
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    6
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: compilation error

    how to do that?
    Can u specify steps involved on that configuration?

  11. #11
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: compilation error

    read this and also INSTALL file in QTDIR.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. Compile 4.4.0
    By LordQt in forum Installation and Deployment
    Replies: 18
    Last Post: 29th May 2008, 13:43
  2. QPSQL driver in windows
    By brevleq in forum Installation and Deployment
    Replies: 31
    Last Post: 14th December 2007, 12:57
  3. Error compiling psql plugin
    By vieraci in forum Installation and Deployment
    Replies: 4
    Last Post: 7th October 2007, 02:49
  4. qt 4.2.2 install on aix
    By try to remember in forum Installation and Deployment
    Replies: 2
    Last Post: 28th March 2007, 12:19
  5. Qt-x11-commercial-src-4.2.0-snapshot-20060824 error
    By DevObject in forum Installation and Deployment
    Replies: 4
    Last Post: 24th August 2006, 23:31

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.