What is the easiest way to reference libraries in Qt projects?
        Posted  
        
            by Jake Petroules
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jake Petroules
        
        
        
        Published on 2010-05-20T02:19:24Z
        Indexed on 
            2010/05/20
            2:20 UTC
        
        
        Read the original article
        Hit count: 352
        
I have two Qt4 Gui Application projects and one shared library project, all referenced under a .pro file with the "subdirs" template. So, it's like:
- exampleapp.pro
- app1.pro
 - app2.pro
 - sharedlib.pro
 
 
Now, what I want to do is reference sharedlib from app1 and app2 so that every time I run app1.exe, I don't have to manually copy sharedlib.dll from its own folder to app1.exe's folder.
I could set PATH environment variable in the projects window, but this isn't very portable. I've looked at putting the LIBS variable in the app1.pro file, but I'm not sure if that refers to statically linked libraries only - I've tried it with various syntaxes and it doesn't seem to work with shared libs.
© Stack Overflow or respective owner