This is my (very simplified) directory tree :
C:.
| common.h
| QMelt.pro
|
+---src
| +---app
| | main.cpp
| | melt.cpp
| | melt.h
| |
| +---io
| | alsfilestreambase.h
| | alsfilesystem.cpp
| | alsfilesystem.h
|
\---test
+---io
| io_test.pro
| io_test.pro.user
|
\---src
alsfilesystemtest.cpp
alsfilesystemtest.h
What I'm trying to achieve is to configure io_test.pro - which is an unit test project (using QTest) - to be able to test the io namespace.
Here is my current io_test.pro :
QT += testlib
QT -= gui
TARGET = tst_io
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
#Test sources
SOURCES += src/alsfilesystemtest.cpp
HEADERS += src/alsfilesystemtest.h
#Testing sources
SOURCES += ../../src/io/alsfilesystem.cpp
HEADERS += ../../src/io/alsfilesystem.h
DEFINES += SRCDIR=\\\"$$PWD/src\\\"
INCLUDEPATH += $$PWD/../..
My problem is that I have linker errors at build time. These errors are on method using QMelt project (the project I want to test) dependecy, included by alsfilesystem.
So my question is what modifications should I bring to io_test.pro in order to use the .obj built by QMelt.pro ?