Is it possible to use static libraries in non-static applications?
Solved
General and Desktop
-
@jsulm I have found a way but I don't know if it will be safe and not degrade the performance of the library.
DEFINES += FTD2XX_STATIC win32: LIBS += -L$$PWD/Static/amd64/ -lftd2xx INCLUDEPATH += $$PWD/. DEPENDPATH += $$PWD/. win32:!win32-g++: PRE_TARGETDEPS += $$PWD/Static/amd64/ftd2xx.lib else:win32-g++: PRE_TARGETDEPS += $$PWD/Static/amd64/libftd2xx.a
I added “DEFINES += FTD2XX_STATIC” before the library file is included.
-
@Blackzero Was the static lib built using same compiler?
-
@jsulm I have found a way but I don't know if it will be safe and not degrade the performance of the library.
DEFINES += FTD2XX_STATIC win32: LIBS += -L$$PWD/Static/amd64/ -lftd2xx INCLUDEPATH += $$PWD/. DEPENDPATH += $$PWD/. win32:!win32-g++: PRE_TARGETDEPS += $$PWD/Static/amd64/ftd2xx.lib else:win32-g++: PRE_TARGETDEPS += $$PWD/Static/amd64/libftd2xx.a
I added “DEFINES += FTD2XX_STATIC” before the library file is included.
-