Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Installation Library Qt 4.8.5
Qt 6.12 LTS is out! See what's new in the release blog

Installation Library Qt 4.8.5

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    I didn't understand a concept:
    first of all: I have compiled and installed correctly library Qt 4.8.5 starting from their source code.
    Then, I have witten a very simple Qt GUI Application and compiled it. All work correctly.
    When I go into directory where has beed produced my output, I see the binary file more other files.

    When I try to run my binary file, my application work. BUT this mean that the library of Qt (shared library) are loaded in a specific space of my machine. I did't set any enviroment variable/create the link to the Qt shared library.
    Someone is able to explain me?
    Thanks for support.
    Stefano

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pascom
      wrote on last edited by
      #2

      Hello,

      I think I have the answer :
      
      I guess you used qmake to generate your Makefile (not CMake). It sets in the linker options in the Makefile the path to the libraries corresponding to the version of Qt (for gcc this is the flags *-L* for static libraries and *-Wl,-rpath* for runtime libraries). Then when you (or more probably Qt) links a shared library it looks in this folder before searching the default library path. This can be seen in QtCreator's compile output, where I copied the following example :
      

      @g++ -Wl,-rpath,/usr/local/Qt/qt-4.8.5/lib -o debug/target .obj_unix/main.o .obj_unix/myccpfile.o .obj_unix/moc_mycppfile.o .obj_unix/qrc_myproject.o -L/usr/local/Qt/qt-4.8.5/lib -lQtGui -L/usr/local/Qt/qt-4.8.5/lib -L/usr/X11R6/lib -lQtCore -lpthread@

       This is under Linux but I think that it works in a similar way on Windows (MSVC) or MacOS (eventhough I don't have any clue as I don't use them) 
      
      This feature is very interesting because it allows you to have more than one version of Qt installed and to use the one you want by just choosing the good @qmake@. As you can see in the example mine is not installed in the normal folder for lib (/usr/lib) but in a path I chose.
      
      Hope this helps you understand this miracle and that it is clear enough, please be clement, this is my first post as you can see.
      
      Regards,
      

      --
      PasCom

      In a world without walls and fences, who needs Gates and Windows?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt
      • Unsolved