Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have managed to overcome this using some Qmake magic that works cross-platform. It copies over the shared libraries (either <code>.dll</code> or <code>.so</code> files) along with the header files to a directory in a directory <code>dll</code> at a level next to your current project.</p> <p>Put this in the end of your <code>.pro</code> files and change the paths/libs accordingly.</p> <pre><code># Copy over build artifacts MYDLLDIR = $$IN_PWD/../dlls DESTDIR = \"$$MYDLLDIR\" # Look for header files there too INCLUDEPATH += $$MYDLLDIR # Dependencies: mylib. Only specify the libs you depend on. # Leave out for building a shared library without dependencies. win32:LIBS += $$quote($$MYDLLDIR/mylib.dll) unix:LIBS += $$quote(-L$$MYDLLDIR) -lmylib DDIR = \"$$MYDLLDIR/\" SDIR = \"$$IN_PWD/\" # Replace slashes in paths with backslashes for Windows win32:file ~= s,/,\\,g win32:DDIR ~= s,/,\\,g win32:SDIR ~= s,/,\\,g for(file, HEADERS) { QMAKE_POST_LINK += $$QMAKE_COPY $$quote($${SDIR}$${file}) $$quote($$DDIR) $$escape_expand(\\n\\t) } </code></pre> <p>Then adjust the <code>LD_LIBRARY_PATH</code> in the 'Run settings' of your project to point to that same <code>dll</code> directory (relatively).</p> <p>Yes, it's ugly with escaping for paths with spaces and backslashes, but I found this to be working well cross-platform. Windows (XP, 7) and Linux tested. And yes it includes environment settings to be changed for running your project, but at least you don't need external (Python) scripts anymore or to install it to system directory requiring root privileges.</p> <p>Improvements are welcome.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload