I am developing an application in QT Creator in c++ on Linux
I have created my own library so that I can use some common classes throughout a set of applications.
In the library I have created I have used another external static library (libSDL.a). I have configured my library to a static library (*.a) and it compiles with no problems.
I then added my library to another application and used some of the classes. When trying to compile my application I am getting undefined references from within my library to function calls to the other library.
From my understanding, static libraries are suppose to be copied in during compilation. Why am I getting the undefined references to a library that should be copied into my library?
Here is how the library project is configured in the *.pro file:
QT -= gui
TARGET = FoobarTools
TEMPLATE = lib
CONFIG += staticlib
CONFIG -= shared
DEFINES += FOOBARTOOLS_LIBRARY
INCLUDEPATH += ./include/SDL_Headers/
LIBS += -L./bin/ -lSDL
SOURCES += ...
HEADERS += ...
Here is how my application *.pro file is using my library:
QT -= gui
TARGET = FoobarApp
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
INCLUDEPATH += ./include/
LIBS += -L./bin/ -lFoobarTools
SOURCES += ...
HEADERS += ...