Results 1 to 13 of 13

Thread: Can't compile

  1. #1
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    8

    Default Can't compile

    It seems I'm not able to compile anymore. I have tried to reinstall both Qt and mingw, and to run make confclean and configure -platform win32-g++ but nothing helps. Here is the error message I get:

    mingw32-make -f Makefile.Debug
    mingw32-make[1]: Entering directory `H:/QT4/ZoomView'
    g++ -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-rel
    oc -mthreads -Wl -Wl,-subsystem,windows -o "debug\ScrollView.exe" debug\main.o d
    ebug\zoomView.o debug\moc_zoomView.o -L"c:\Qt\4.3.1\lib" -lmingw32 -lqtmaind -l
    QtGuid4 -lQtCored4
    C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot fin
    d -lqtmaind
    collect2: ld returned 1 exit status
    mingw32-make[1]: *** [debug\ScrollView.exe] Error 1
    mingw32-make[1]: Leaving directory `H:/QT4/ZoomView'
    mingw32-make: *** [debug] Error 2


    Does anyone know what could be the problem or how I could fix this?

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Can't compile

    Qt open source for Windows does not come with the debug libraries. You have to compile it if you wish to link with the debug version.

    Change your application's target to release.

    Regards

  3. #3
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    8

    Default Re: Can't compile

    I edited the .pro file so its target is now RELEASE and I also ran configure -release, but I still get the same error
    [/noob]

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Can't compile

    Can you post the .pro file?

    Regards

  5. #5
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    8

    Default Re: Can't compile

    Qt Code:
    1. ######################################################################
    2. # Automatically generated by qmake (2.01a) Tue Aug 21 22:59:28 2007
    3. ######################################################################
    4.  
    5. TEMPLATE = app
    6. TARGET = RELEASE
    7. DEPENDPATH += .
    8. INCLUDEPATH += .
    9.  
    10. # Input
    11. HEADERS += zoomView.h
    12. SOURCES += main.cpp zoomView.cpp
    To copy to clipboard, switch view to plain text mode 

  6. #6
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Can't compile

    remove target and add CONFIG += release

  7. The following user says thank you to marcel for this useful post:

    ihoss (23rd August 2007)

  8. #7
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    8

    Default Re: Can't compile

    well, there is progress; now it can't find -lQtGui4

  9. #8
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Can't compile

    What about your environment? Is it set correctly( QTDIR, QTDIR\bin added to path?
    You have Qt Command Prompt in the start menu. It will start a cmd with the appropriate environment set.

    Regards

  10. #9
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    8

    Default Re: Can't compile

    The path variable has been set, and I also ran the QT command Prompt, but it didnt help.

  11. #10
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Can't compile

    What does "qmake -v" output? What does "C:\Qt\4.3.1\lib" contain?
    J-P Nurmi

  12. #11
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    8

    Default Re: Can't compile


    H:\QT4\ZoomView>qmake -v
    QMake version 2.01a
    Using Qt version 4.3.1 in C:/Qt/4.3.1/lib

    C:\QT\4.3.1\lib contains:

    libqtmain.a
    libQtUiTools.a
    libQtUiToolsd.a
    Qt3Support.prl
    Qt3Supportd.prl
    QtAssistantClient.prl
    QtAssistantClientd.prl
    QtCore.prl
    QtCored.prl
    QtDesigner.prl
    QtDesignerComponents.prl
    QtDesignerComponentsd.prl
    QtDesignerd.prl
    QtGui.prl
    QtGuid.prl
    qtmain.prl
    qtmaind.prl
    QtNetwork.prl
    QtNetworkd.prl
    QtOpenGL.prl
    QtOpenGLd.prl
    QtScript.prl
    QtScriptd.prl
    QtSql.prl
    QtSqld.prl
    QtSvg.prl
    QtSvgd.prl
    QtTest.prl
    QtTestd.prl
    QtUiTools.prl
    QtUiToolsd.prl
    QtXml.prl
    QtXmld.prl
    README


    BTW, thanks a lot for your help

  13. #12
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    Default Re: Can't compile

    How did you install Qt? Looks like you're missing the most important files; libQtCore4.a, libQtGui4.a etc.
    J-P Nurmi

  14. The following user says thank you to jpn for this useful post:

    ihoss (24th August 2007)

  15. #13
    Join Date
    Aug 2007
    Posts
    39
    Thanks
    8

    Default Re: Can't compile

    I reinstalled everything and now it works! Thanks a lot for all your help

Similar Threads

  1. Use VC2005 to compile Qt program (4.3.0)
    By firegun9 in forum Qt Programming
    Replies: 3
    Last Post: 8th June 2007, 17:04
  2. Qt-4.2.2 qmake won't compile under visual studio 2005 on vista
    By moowy in forum Installation and Deployment
    Replies: 7
    Last Post: 13th January 2007, 22:06
  3. Need to compile with MySQL drivers/plugins
    By mongenix in forum Newbie
    Replies: 5
    Last Post: 6th January 2007, 21:24
  4. Compile Errors
    By luffy27 in forum Qt Programming
    Replies: 3
    Last Post: 4th November 2006, 06:26
  5. how to correctly compile threads support?
    By srhlefty in forum Installation and Deployment
    Replies: 9
    Last Post: 25th June 2006, 20:15

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
  •  
Qt is a trademark of The Qt Company.