[Qt-interest] how to use static library instead of dll library

Vincent Cai wcai at cypress.com
Fri Oct 28 07:35:21 CEST 2011


Hi,

         I have an application project and library project.
         The library project will generate both static and dll library.
         And the application will use the library.

         My question is how to config the application project to use static library or dll library?
         The code below will always use the dll library, and I don't know how to make it use static library instead.

TEMPLATE = app
CONFIG += console
QT -= gui
OBJECTS_DIR = obj
MOC_DIR = moc
INCLUDEPATH += ../SRC/qserialdevice
SOURCES += main.cpp \
CONFIG(debug, debug|release) {
    QMAKE_LIBDIR += ../SRC/build/debug
    LIBS += -lqserialdeviced
    DESTDIR = debug
    TARGET = Apped
} else {
    QMAKE_LIBDIR += ../SRC/build/release
    LIBS += -lqserialdevice
    DESTDIR = release
    TARGET = App
}

Thanks,
Vincent.

________________________________
This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20111028/09076b7f/attachment.html 


More information about the Qt-interest-old mailing list