Results 1 to 3 of 3

Thread: Reading library version

  1. #1
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Reading library version

    Hi!
    As I found in Assistant, I can set the version of my library with VERSION qmake variable.
    This generates resource on Windows with VS_VERSION_INFO or something like this so the version is visible in dll file properties. But is there any way to get the version of loaded library? For example: I want to dynamicaly load shared library or plugin and check the version of it. On Windows I can use some WinAPI functions to get this VS_VERSION... but is there any cross-platform way to do this? If no, then how can I do the same on Linux (don't know if the version is stored anywhere)?
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  2. #2
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Reading library version

    setting VERSION should (on Linux) result in libs named libXXX.so.x.y.z where x.y.z comes from your VERSION

  3. #3
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Reading library version

    Yes, but is this (the filename) the only place where I can find the version number? And what happend if I would have only lib*.so file in my directory?

    And next thing is:
    I have some library on Windows, let's say mylib (TARGET = mylib), but when I set version (VERSION = 1.2.3) then the resulting filename is: mylib1.dll. How to get the normal name (mylib.dll)? I would like this name without number, because I am already loading some plugins by name, so it will simply stop working if version changes.
    Last edited by faldzip; 1st August 2009 at 16:07.
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

Similar Threads

  1. qmake and library version handling
    By viridis in forum Qt Programming
    Replies: 3
    Last Post: 6th March 2009, 09:27
  2. Designer doesn't load wwWidgets plugin
    By reimer in forum Installation and Deployment
    Replies: 21
    Last Post: 7th February 2009, 03:23
  3. QWT 5, QT3, SuSE 10.2. Crash and burn
    By DrMcCleod in forum Qwt
    Replies: 8
    Last Post: 7th September 2007, 20:53
  4. Distributing QT application for Mac OS
    By mb0 in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2007, 18:59
  5. Replies: 15
    Last Post: 21st April 2007, 17:46

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.