Вы здесь

Configure QT and QT Project with libdln.a for Linux

Configuring QT

To successfully create and compile QT applications and use libdln.a library in Linux, you need to correctly configure and setup QT. This steps should be performed after you successfully performed steps from Software & Hardware Installation in Linux page.

First, download QT sources from QT website (http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywh...), unpack archive, open terminal in unpacked folder with QT, configure QT with-release and-static flags, then compile QT sources and install QT. For this example QT 4.8.5 version was used.

C/C++
./configure
-release -nomake demos -nomake examples
make
make install

Configuring QT Project and Connecting libdln.a Library

After QT is compiled you can compile and run any QT application by using properqmake project_name from application sources folder. You can use terminal or QT Creator for creating applications.

device_list_gui project compilation from terminal:

C/C++
path_to_qmake/qmake
device_list_gui
make

To use libdlb.a library in your application project, you need to add the following to project .pro file:

C/C++
QMAKE_LFLAGS
+= -static-libgcc
LIBS += /usr/local/lib/libdln.a # path to libdln.a library

Also do not forget to include required header .h files to your sources for successful usage API functions from libdln.a. For example:

C/C++
#include
"../common/dln.h"
#include "../common/dln_generic.h"

Rating: 
Голосов пока нет

Языки

Вход на сайт