Erfan Tavakoli
Erfan Tavakoli

Reputation: 356

make C++ Library with qt

i build a C++ library with qt creator. qt builds for me in debug folder 3 files:

'1. libSerialize.a' and '2. Serialize.dll' and 'serialize.o' .

now i want to add this library to another qt project. how can i do that?. how can i include that library? . where should i copy those? . which one is necessary? . this is my .pro file:

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = get_send_array
TEMPLATE = app


SOURCES += main.cpp\
        widget.cpp \
    student.cpp

HEADERS  += widget.h \
    student.h

so thanks, please help me.

Upvotes: 0

Views: 1161

Answers (1)

maverik
maverik

Reputation: 5606

Use:

win32:LIBS += /path/to/the/lib/Serialize.dll
unix:LIBS += -L/path/to/the/lib/ -lSerialize

Serialize.dll is a windows dynamic load library, and libSerialize.a is an ar archive (you may reffer to it as a static library) and usually used in *nix systems.

Upvotes: 5

Related Questions