Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h3>Compiling external libraries with QtCreator/gcc</h3> <p>If you own the source code of your libraries this is the .pro file to make an external library (.dll and .a) or Framework (on Mac OS X) from them:</p> <pre><code>TEMPLATE = lib INCLUDEPATH = &lt;your-include-paths&gt; HEADERS += &lt;your-headers&gt; SOURCES += &lt;your-sources&gt; TARGET = MyLib /* The name of your libary */ /* Win32: To generate a MyLib.dll and libMyLib.a (gcc) or MyLib.lib (MSVC) file */ win32 { CONFIG += dll } /* Just in case you need to generate Mac Frameworks: */ macx { CONFIG += shared lib_bundle FRAMEWORK_HEADERS.version = Versions FRAMEWORK_HEADERS.files += &lt;your library headers&gt; /* Example: FRAMEWORK_HEADERS.files += /path/to/your/lib/MyLib.h */ FRAMEWORK_HEADERS.path = Headers QMAKE_BUNDLE_DATA = FRAMEWORK_HEADERS VERSION = 0.5.0 // a framework version you can define } </code></pre> <h3>Adding external libraries to your QtCreator/gcc project</h3> <pre><code>/* your project settings */ /* If you compile on windows */ win32 { /* If you compile with QtCreator/gcc: */ win32-g++:LIBS += /path/to/your/libMyLib.a /* IF you compile with MSVC: */ win32-msvc:LIBS += /path/to/your/libMyLib.lib } /* If compile on Mac and want to link against a framework */ macx { LIBS+= -framework MyLib QMAKE_FLAGS += -F/path/to/MyLib } </code></pre> <p>Note that to use external libraries with <code>gcc</code> you need the libMyLib.a file that contains the linking information. The <code>libMyLib.lib</code> are generated by MS Visual Studio and can't be processed by gcc afaik!</p>
 

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