Results 1 to 4 of 4

Thread: Small DLL hell adventure

  1. #1
    Join Date
    Sep 2009
    Posts
    31
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Small DLL hell adventure

    Hi!
    I decide to inform user's here about my simply problem, which however I was solving for about three days. I've installed Qt 4.5.3 correctly a I was developing some program in Qt and everything was ok. I have developed it in MSVC 2005 and suddenly, I need to run my program in release without MSVC IDE. Some time before it runs ok, but now, program crashed after some actions was done. So I started to look for my error in program, something as uninitialized variable or something else. But everything seems ok.
    The strange was, that when I run program in release under MSVC, it was ok. But when I run it from windows, it crashed. I had tried debugging in release and I found some memory overwrite there! Everything points to function QPainterPath::toSubpathPolygons(). But the problem was elsewhere. Fortunately I was given an idea, that I check all linked libraries. So I run it in MSVC and copy libraries list out. Then I run it from windows and than I attached the debugger. I copy list again and compare it. What was my surprise when I had seen Qt4Core.dll loaded form ...../MikTeX/tex/bin/Qt4Core.dll.

    Whole problem starts, when I had one day installed the MikTeX. It had self added path to /bin to my PATH and my program was than loading it's Qt4Core.dll instead of correct DLL from Qt's bin. Than I detect, that my MikTeX are using Qt 4.2.1 (I mentioned above I'm using Qt 4.5.3).

    And now my question. Is Qt DLL's naming ok? Do you thing that name Qt4Core is adequate. Couldn't it be named e.g. Qt4_2_1Core.dll or similar? Or is it my mistake and I should to check Qt's dll version in application myself? I know that Windnows have problems with dynamic libraries linking, but is't it solvable only by using correct names of DLLs?

    Sorry for my terrible English, but i want to share my experience :-).
    Thanks for an explanation of my question in last paragraph.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Small DLL hell adventure

    Qt DLL's naming ok? Do you thing that name Qt4Core is adequate. Couldn't it be named e.g. Qt4_2_1Core.dll or similar? Or is it my mistake and I should to check Qt's dll version in application myself? I know that Windnows have problems with dynamic libraries linking, but is't it solvable only by using correct names of DLLs?
    Since windows doesn't have the notion of symbolic links, what you suggest would force applications to run only with one specific version of Qt due to differing names of the Qt dlls over varying versions.


    Under linux you have no such problem since you can use symbolic links.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Small DLL hell adventure

    Couldn't it be named e.g. Qt4_2_1Core.dll or similar?
    yes i think they should do it like that. We have msvcrt80.dll, msvcrt90.dll, and even Qt3 use to have the version numbers (qt-mt336.dll remember?) i dont know why we are using the same name for the whole 4x series.

  4. #4
    Join Date
    Sep 2009
    Posts
    31
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Small DLL hell adventure

    I think the reason is that Qt want to be able to run applications with different versions of Qt. But in my opinion, there should be no radical changes between different versions. Unfortunately my experiences are other. I have had to do nearly always some changes in my source code, when i use newer Qt library.
    Sure, i can do dynamic checks of Qt's version in my application, but is it right?

Similar Threads

  1. Self contained, small as possible app.
    By squidge in forum Installation and Deployment
    Replies: 4
    Last Post: 16th October 2009, 15:58
  2. Small Libraries
    By porfirio in forum Installation and Deployment
    Replies: 7
    Last Post: 13th August 2009, 10:16
  3. dll hell
    By jhowland in forum Qt Programming
    Replies: 3
    Last Post: 6th September 2008, 14:30
  4. HDD & BIOS : why the hell is that so badly designed???
    By fullmetalcoder in forum General Discussion
    Replies: 13
    Last Post: 19th April 2006, 12:37

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.