Results 1 to 20 of 20

Thread: compilation error

  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].

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

    Default Re: compilation error

    i just configured qt and tried again by compiling application,still problem not rectified.

  13. #13
    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

    do mingw32-make clean and then repeat configure process.
    and also check your QTDIR, QMAKESPEC, INCLUDE, LIB and PATH variable they mast containt correct values.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  14. #14
    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 mingw-32-make clean?
    I think these r the steps i need to follow:
    After open the Qt command prompt, i just need to enter "mingw-32-make clean".
    once the above step has been finished i have to give "configure" again.

    Am i correct spirit or is there any thing else?

  15. #15
    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

    yes, this should be enough.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  16. #16
    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 done what u mentioned in ur last post spirit.
    These are my directories setting to the paths:

    Setting up a MinGW/Qt only environment...
    -- QTDIR set to F:\Qt\4.4.3
    -- PATH set to F:\Qt\4.4.3\bin
    -- Adding F:\MinGW\bin to PATH
    -- Adding C:\WINDOWS\System32 to PATH
    -- QMAKESPEC set to win32-g++

    still the example is not compiling?

    note: while configuring my qt, i got on pop up from my system that states qmake.exe file is corrupted and it is unreadable. What does it mean.

    As u told i am installing my QT on "F" directory.

  17. #17
    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

    okay, try to rebuild qmake, go to QTDIR/qmake and run mingw32-make.
    btw, after Qt configuration you had to run mingw32-make. did you do this? only after that process of building will be started and it takes from 1 to 5 hours (the compilation time depents of your hardware configuration).
    PS. if you will not reach successful result I'll record a video man for you how to build Qt.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

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

    Default Re: compilation error

    after giving "mingw32-make" in QTDIR/qmake,the response is this:

    mingw32-make: `qmake.exe' is up to date.

    now i gave mingw32-make in my QTDIR, as per ur last post it may take 5hrs time,Am i right spirit?

    one more thing spirit,
    When i installed QT 2months back in my previous company,I have not followed these many steps.Simply installing MINGW and installed qt by double clicking on software.then i executed example and even i developed projects also.But now i shifted to another company and i am trying to execute simple code it is not working properly.
    you are telling so many steps to work QT properly,Do you know what is the problem spirit.
    I think the problem is related to OS or system related, Am i right or not?

  19. #19
    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 got these error when i gave "mingw32-make" command:
    F:/Qt/4.4.3/src/corelib/io/qfsfileengine_win.cpp:1449: undefined reference to `C
    oCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 2b2):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoInitialize@4'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 2e0):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 307):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `IID_IPersistFile'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 49b):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoUninitialize@0'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 4dc):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 4fb):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoInitialize@4'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 52c):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 553):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `IID_IPersistFile'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 7d8):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoUninitialize@0'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 829):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 848):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoInitialize@4'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 879):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa 8a0):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `IID_IPersistFile'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa a37):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoUninitialize@0'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa a78):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa a97):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoInitialize@4'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa ac8):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa aef):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `IID_IPersistFile'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa df3):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1449: undefined reference to `CoUninitialize@0'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa f38): In function `ZN13QFSFi
    leEngine4linkERK7QString':
    F:/Qt/4.4.3/src/corelib/io/qfsfileengine_win.cpp:1556: undefined reference to `C
    oCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa f57):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoInitialize@4'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xa f85):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xb 1e1):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `IID_IPersistFile'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xb 289):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoUninitialize@0'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xb 35c):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xb 37b):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoInitialize@4'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xb 3a9):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xb 92b):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `IID_IPersistFile'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xb b0b):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoUninitialize@0'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xb bb7):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xb bd6):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoInitialize@4'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xb c04):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xb e92):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `IID_IPersistFile'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xb f3a):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoUninitialize@0'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xc 00d):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xc 02c):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoInitialize@4'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xc 05a):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoCreateInstance@20'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xc 5dc):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `IID_IPersistFile'
    ./tmp\obj\debug_shared\qfsfileengine_win.o(.text+0xc 960):F:/Qt/4.4.3/src/corelib
    /io/qfsfileengine_win.cpp:1556: undefined reference to `CoUninitialize@0'
    ./tmp\obj\debug_shared\quuid.o(.text+0x22e3): In function `ZN5QUuid10createUuidE
    v':
    F:/Qt/4.4.3/src/corelib/plugin/quuid.cpp:566: undefined reference to `CoCreateGu
    id@4'
    ./tmp\obj\debug_shared\qeventdispatcher_win.o(.text+ 0x2ac5): In function `ZN28QE
    ventDispatcherWin32Private16doWsaAsyncSelectEi':
    F:/Qt/4.4.3/src/corelib/kernel/qeventdispatcher_win.cpp:619: undefined reference
    to `WSAAsyncSelect@16'
    collect2: ld returned 1 exit status
    mingw32-make[2]: *** [..\..\lib\QtCored4.dll] Error 1
    mingw32-make[2]: Leaving directory `F:/Qt/4.4.3/src/corelib'
    mingw32-make[1]: *** [debug-all] Error 2
    mingw32-make[1]: Leaving directory `F:/Qt/4.4.3/src/corelib'
    mingw32-make: *** [sub-corelib-make_default-ordered] Error 2

  20. #20
    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

    Quote Originally Posted by jjbabu View Post
    Am i right spirit?
    I said, it depends of you system. on my system build process takes 1h 15m.

    Quote Originally Posted by jjbabu View Post
    Do you know what is the problem spirit.
    I don't know, that's why I suggest you to build Qt manually.

    Quote Originally Posted by jjbabu View Post
    I think the problem is related to OS or system related, Am i right or not?
    I'm not sure.
    again if after rebuilding Qt you will have the same problem, then maybe something wrong with you system, but doubt that it connects with system.

    btw, I never use intallation of Qt, I always build it by myself.
    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.