Results 1 to 6 of 6

Thread: Configure uses -lQtCore and -lQtGui while only -lQtCore4 and -lQtGui4 exist

  1. #1

    Default Configure uses -lQtCore and -lQtGui while only -lQtCore4 and -lQtGui4 exist

    Cannot find -lQtCore
    Cannot find -lQtGui

    Is reported when compiling src/tools/idc/main.cpp

    Which is correct, since in lib indeed libQtCore.a and libQtGui.a are not existing. But libQtCore4.a and libQtGui4.a DO exist.
    I assume the '4' version must be used? How would I make this change?

    Editing IDC's makefile doesn't work, since it's generated by configure prior to the error.
    Do I need to edit a .pro file? Which one!

    Thanks.

    PS: I'm statically compiling Qt

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

    Default Re: Configure uses -lQtCore and -lQtGui while only -lQtCore4 and -lQtGui4 exist

    Please tell us step by step what you did.
    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.


  3. #3

    Default Re: Configure uses -lQtCore and -lQtGui while only -lQtCore4 and -lQtGui4 exist

    I downloaded the latest Qt Libraries package (qt-win-opensource-4.7.4-mingw) and ran configure.exe with the following command parameters:

    configure -prefix e:\SDK\Qt\4.7.4\ -platform win32-g++ -xplatform win32-g++ -static -release -opensource -confirm-license -phonon -qt-zlib -qt-libpng -qt-libjpeg -no-libtiff -no-libmng -no-openssl -nomake examples -nomake demos -nomake docs -no-webkit -no-script -no-scripttools -no-declarative -no-s60 -no-qt3support -no-style-plastique -no-style-cleanlooks -no-style-motif -no-style-cde -qt-style-windowsvista

    This is a static release compilation using g++ (g++-dw2) from the TDM-GCC package.
    When running a lot goes well, but this error message is produced by LD:

    mingw32-make[2]: Entering directory `E:/SDK/Qt/4.7.4/src/tools/idc'
    g++ -c -O2 -frtti -fexceptions -mthreads -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT
    -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE
    _SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"..\..\..\include\QtC
    ore" -I"..\..\..\include\QtGui" -I"..\..\..\include" -I"..\..\..\include\ActiveQ
    t" -I"tmp\moc\release_static" -I"..\..\..\mkspecs\win32-g++" -o tmp\obj\release_
    static\main.o main.cpp
    g++ -Wl,-s -Wl,-subsystem,console -mthreads -o ..\..\..\bin\idc.exe tmp/obj/rele
    ase_static/main.o -L"e:\SDK\Qt\4.7.4\lib" -L"e:\SDK\Qt\4.7.4\lib" -lQtGui -lgdi
    32 -lcomdlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCore -lole32 -
    luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32
    e:/compilers/tdm/bin/../lib/gcc/mingw32/4.6.1-dw2/../../../../mingw32/bin/ld.exe
    : cannot find -lQtGui
    e:/compilers/tdm/bin/../lib/gcc/mingw32/4.6.1-dw2/../../../../mingw32/bin/ld.exe
    : cannot find -lQtCore
    collect2: ld returned 1 exit status
    mingw32-make[2]: *** [..\..\..\bin\idc.exe] Error 1
    mingw32-make[2]: Leaving directory `E:/SDK/Qt/4.7.4/src/tools/idc'
    mingw32-make[1]: *** [release] Error 2
    mingw32-make[1]: Leaving directory `E:/SDK/Qt/4.7.4/src/tools/idc'
    mingw32-make: *** [sub-idc-make_default] Error 2
    Building src/tools failed, return code 2
    And indeed. The libraries it tries to link do not exist in the 'lib' directory.
    Only the .prl files with that name exist.

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

    Default Re: Configure uses -lQtCore and -lQtGui while only -lQtCore4 and -lQtGui4 exist

    I suggest you download the source-only bundle, unpack it outside the sdk branch and configure there.
    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

    Default Re: Configure uses -lQtCore and -lQtGui while only -lQtCore4 and -lQtGui4 exist

    Downloaded qt-everywhere-opensource-src-4.7.4, but it's giving the exact same error.
    It's not that GCC has a version too high? Or that I forgot a step?

    In fact, the lib directory contains no library files whats-o-ever at the point it tries to configure / build IDC.

    How is this _supposed_ to work?
    Why does configure need the libraries that configure configures for, and the make command should be building afterwards.
    Sounds weird to me...chicken-egg problem.

    Thanks for your help so far though

  6. #6

    Default Re: Configure uses -lQtCore and -lQtGui while only -lQtCore4 and -lQtGui4 exist

    Did 2 things (not sure which fixed it):

    Added -no-exceptions to the configure command line. And in mkspecs/win32-g++/qmake.conf set:
    QMAKE_LFLAGS = -static -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc

    Configures now. It didn't even went compiling source files after generating the makefiles from the .pro files (which it did before and caused the error).

Similar Threads

  1. IS this allright + how to see if it exist
    By Nazgul in forum Newbie
    Replies: 15
    Last Post: 18th March 2011, 23:01
  2. configure fails if .svn folders exist
    By rrabien in forum Installation and Deployment
    Replies: 5
    Last Post: 28th February 2011, 15:16
  3. rcc: File does not exist
    By lyuts in forum Qt Programming
    Replies: 2
    Last Post: 18th October 2010, 08:26
  4. cannot find -lQtGui -QT Beginner Help Needed
    By nsa in forum Installation and Deployment
    Replies: 5
    Last Post: 18th July 2009, 07:31
  5. XML Database: eXist
    By Lykurg in forum Qt Programming
    Replies: 3
    Last Post: 6th March 2007, 23:22

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.