Hi, i have the following structure in my project:
tester/tester.pro
tester/tester.cpp
calina/widget.h
calina/widget.cpp
calina/calina.pro
main.pro
main.pro
SUBDIRS += calina \
tester
TEMPLATE = subdirs
CONFIG += warn_on \
qt \
thread
SUBDIRS += calina \
tester
TEMPLATE = subdirs
CONFIG += warn_on \
qt \
thread
To copy to clipboard, switch view to plain text mode
calina.pro
TEMPLATE = lib
CONFIG += dll \
debug \
opengl \
x11
CONFIG -= release \
stl \
thread
QT += xml \
opengl
TARGET = ../bin/calina
HEADERS += widget.h
SOURCES += widget.cpp
TEMPLATE = lib
CONFIG += dll \
debug \
opengl \
x11
CONFIG -= release \
stl \
thread
QT += xml \
opengl
TARGET = ../bin/calina
HEADERS += widget.h
SOURCES += widget.cpp
To copy to clipboard, switch view to plain text mode
tester.pro
TEMPLATE = app
CONFIG -= release \
stl \
thread
CONFIG += debug \
opengl
QT += xml \
opengl
INCLUDEPATH += ../calina
LIBS += -L../calina \
-l../bin/calina
TARGETDEPS += ../calina/lib../bin/calina.so
SOURCES += tester.cpp
TEMPLATE = app
CONFIG -= release \
stl \
thread
CONFIG += debug \
opengl
QT += xml \
opengl
INCLUDEPATH += ../calina
LIBS += -L../calina \
-l../bin/calina
TARGETDEPS += ../calina/lib../bin/calina.so
SOURCES += tester.cpp
To copy to clipboard, switch view to plain text mode
tester.cpp
#include "widget.h"
int main(int argc, char *argv[])
{
calina::Widget widget;
widget.doSomething();
return 0;
}
#include "widget.h"
int main(int argc, char *argv[])
{
calina::Widget widget;
widget.doSomething();
return 0;
}
To copy to clipboard, switch view to plain text mode
but if i try to compile it, i get the followin error
## no error, the lib is compiled and then moved to /bin/libcalina.so.1.0.0
make[1]: Leaving directory `/home/damdam/Documents/projekte/dipl_arb/source/calina'
cd tester && /usr/bin/qmake tester.pro -unix -o Makefile
cd tester && make -f Makefile
make[1]: Entering directory `/home/damdam/Documents/projekte/dipl_arb/source/tester'
g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_XML_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include/QtGui -I/usr/include/QtOpenGL -I/usr/include/QtOpenGL -I/usr/include/QtXml -I/usr/include/QtXml -I/usr/include -I../calina -I/usr/X11R6/include -I. -I. -o tester.o tester.cpp
tester.cpp:33: warning: unused parameter ‘argc’
tester.cpp:33: warning: unused parameter ‘argv’
make[1]: *** Keine Regel vorhanden, um das Target »../calina/lib../bin/calina.so«,
benötigt von »tester«, zu erstellen. Schluss.
//make[1]: *** No rule to create target >>../calina/lib.......s<<
// needed by >>teser<<
make[1]: Leaving directory `/home/damdam/Documents/projekte/dipl_arb/source/tester'
make: *** [sub-tester-make_default] Fehler 2
// .. error 2
Can you pleas help me?
Bookmarks