Results 1 to 14 of 14

Thread: libQt...4d.a files set

  1. #1
    Join Date
    Sep 2007
    Posts
    31
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Red face libQt...4d.a files set

    Hi everyone. I know: 99% of questions about Qt is installation problems of open-source version (I think Trolltech made it specially for increasing sales of commercial version . My question is not trivial, haven't found it yet (except my same one on qtforum.org),

    I'm trying to compile Qt 4.3.1.

    Here is my script:

    Qt Code:
    1. @echo off
    2. rem
    3. rem This file is generated
    4. rem
    5.  
    6. echo Setting up a MinGW/Qt only environment...
    7. echo -- QTDIR set to C:\Qt\4.3.1
    8. echo -- PATH set to C:\Qt\4.3.1\bin
    9. echo -- Adding C:\MinGW\bin to PATH
    10. echo -- Adding %SystemRoot%\System32 to PATH
    11. echo -- QMAKESPEC set to win32-g++
    12.  
    13. set QTDIR=C:\Qt\4.3.1
    14. set PATH=C:\Qt\4.3.1\bin
    15. set PATH=%PATH%;C:\MinGW\bin
    16. set PATH=%PATH%;%SystemRoot%\System32
    17. set QMAKESPEC=win32-g++
    18.  
    19. cd %QTDIR%
    20. REM make confclean
    21. pause
    22. configure -debug-and-release -static -no-qt3support -no-rtti -no-stl -no-exceptions -no-accessibility -qt-libpng -qt-libjpeg -qt-sql-psql -I "C:\Progra~1\PostgreSQL\8.2\include" -L "C:\Progra~1\PostgreSQL\8.2\lib" l libpq
    23. cd %QTDIR%\src
    24. REM qmake
    25. mingw32-make sub-src
    To copy to clipboard, switch view to plain text mode 

    There are no problems with paths etc. All processes passed without any error. I've just one big problem: can't compile programs which use libQt...4d (e.g. - libQtGui4d) libs (v4 debug libs). There are all other versions of libs compiled and placed into lib folder (e.g. - there are libQtGuid.a, libQtGui.a, libQtGui4.a).

    Programs which doesn't use v4 debug libs are also compiled and launched successfully.

    I've spent two days without any hint. There are no such problem reports yet in internet. I think most of Qt users suspect nothing about absence of v4 debug libs.

    So questions are:
    1. Does anyone have libQt...d4.a files in Qt lib folder yet? If yes - give me some clue - what I've missed and where. What for these "v4" versions needed yet?

    2. Does qtmake launching (commented in my script) is neccessary? What does it do at all in my case?

    In officialy generated qtvars.bat it's present, in lot of forum posts - absent. Who knows?

    Thanks for any questions.

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

    Default Re: libQt...4d.a files set

    I don't know if it helps, but for the shared version the debug libraries are in the bin directory.

    Regards

  3. #3
    Join Date
    Jan 2006
    Location
    Kerala
    Posts
    371
    Thanks
    76
    Thanked 37 Times in 32 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: libQt...4d.a files set

    Here is how I compile the Qt Windows Opensource version.
    As it uses mingw, which sets INCLUDE and LIB environment variables, and this causes compilation errors in some machines. So after talking to hte trolltech support team( and ya, they answers question from Opensource guys ). they have asked me to unset these varaibles. So I edited my qtvars.bat ( C:\Qt\4.3.1\bin\qtvars.bat ) file as follows

    Qt Code:
    1. @echo off
    2. rem
    3. rem This file is generated
    4. rem
    5.  
    6. echo Setting up a MinGW/Qt only environment...
    7. echo -- QTDIR set to C:\Qt\4.3.1
    8. echo -- PATH set to C:\Qt\4.3.1\bin
    9. echo -- Adding C:\MinGW\bin to PATH
    10. echo -- Adding %SystemRoot%\System32 to PATH
    11. echo -- QMAKESPEC set to win32-g++
    12.  
    13. set LIB=
    14. set INCLUDE=
    15. set QTDIR=C:\Qt\4.3.1
    16. set PATH=C:\Qt\4.3.1\bin
    17. set PATH=%PATH%;C:\MinGW\bin
    18. set PATH=%PATH%;%SystemRoot%\System32
    19. set QMAKESPEC=win32-g++
    20.  
    21. if not "%1"=="compile_debug" goto END
    22. cd %QTDIR%
    23. echo This will configure and compile qt in debug.
    24. echo The release libraries will not be recompiled.
    25. pause
    26. configure -plugin-sql-sqlite -plugin-sql-odbc -qt-libpng -qt-libjpeg
    27. cd %QTDIR%\src
    28. qmake
    29. mingw32-make debug
    30. :END
    To copy to clipboard, switch view to plain text mode 
    Notice the set LIB= and INCLUDE= ( linenumber 13, 14 )
    Works for me
    We can't solve problems by using the same kind of thinking we used when we created them

  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: libQt...4d.a files set

    Maybe this question sounds stupid, but what is the point of having static debug libraries (unless you just want to fill up your harddisk and you didn't find an easier way to do it)?

  5. #5
    Join Date
    Sep 2007
    Posts
    31
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: libQt...4d.a files set

    Thanks for your answers. Solution was found. libQt...d4.a files are creating for "shared" compilation ONLY. They are absent after "static" compilation of Qt sources.
    Many makefiles of "examples" and "demos" after "static" compilation contains "...d4" libs references. I think it's a some sort of bug. qmake shouldn't put refs to "...d4" libs while Qt configured statically. Btw - after patching Makefiles manually and removing "4" at the end of lib names - they are compiling perfectly.

    So - is that a bug of qmake?

  6. #6
    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: libQt...4d.a files set

    It's not a bug (at least not directly). When compiling statically, you should only compile sub-src (thus omitting examples, tools, etc.) and it would have worked anyway if you told qmake to compile in release mode.

    I'd still like to know the answer to my question

  7. #7
    Join Date
    Sep 2007
    Posts
    31
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libQt...4d.a files set

    If you mean "what is the point of having static debug libraries" - my point is that compiled statically apps loads faster. It takes much more time to load all dinamically linked libraries then statically linked ones.

  8. #8
    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: libQt...4d.a files set

    But in such situation (if the load speed was your primary goal) you'd use libraries built in release mode and not in debug mode. Use of these only makes sense when you're developping the application and that's usualy done with shared libraries (among other reasons the compilation is faster).

  9. The following user says thank you to wysota for this useful post:

    sunil.thaha (13th September 2007)

  10. #9
    Join Date
    Sep 2007
    Posts
    31
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: libQt...4d.a files set

    Thanks. Problem solved. Just put somewhere in faq that ...d4 libs in static mode aren't created.

  11. #10
    Join Date
    Sep 2007
    Posts
    31
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Post Re: libQt...4d.a files set

    btw, "sub-src" param doesn't helps - all examples and demos are compiled (including ..d4 libs which aren't existing). I still think it's at least low-level priority bug.

  12. #11
    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: libQt...4d.a files set

    Quote Originally Posted by brokensword View Post
    btw, "sub-src" param doesn't helps - all examples and demos are compiled
    This is not possible. You must have used it in a wrong way (your script in the first post is invalid - it changes the current directory to src and then calls make sub-src, instead of calling it from the top level directory). I meant something like this:

    cd qtsourcedir
    configure.exe -static
    make sub-src

  13. #12
    Join Date
    Sep 2007
    Posts
    31
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: libQt...4d.a files set

    it builds examples and demos anyway.

    QT_BUILD_PARTS -= examples
    QT_BUILD_PARTS -= demos

    solve this problem.
    Last edited by brokensword; 17th September 2007 at 21:30.

  14. #13
    Join Date
    Sep 2007
    Posts
    31
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: libQt...4d.a files set

    btw, the main question remains - why static "*d4.a" libraries can't be built?

  15. #14
    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: libQt...4d.a files set

    I don't know if they *can't* be built, but if so, then I'd say that because nobody assumed that anyone would ever want to build them.

Similar Threads

  1. Replies: 5
    Last Post: 22nd September 2006, 08:04
  2. [Win32/VC++ 8.0] Strange problems with qrc_*.cpp files
    By mloskot in forum Installation and Deployment
    Replies: 6
    Last Post: 6th March 2006, 10:28

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.