Results 1 to 20 of 28

Thread: project with a dll and a testprog (doesn't compile)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2006
    Posts
    79
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default project with a dll and a testprog (doesn't compile)

    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
    Qt Code:
    1. SUBDIRS += calina \
    2. tester
    3. TEMPLATE = subdirs
    4. CONFIG += warn_on \
    5. qt \
    6. thread
    To copy to clipboard, switch view to plain text mode 

    calina.pro
    Qt Code:
    1. TEMPLATE = lib
    2.  
    3. CONFIG += dll \
    4. debug \
    5. opengl \
    6. x11
    7. CONFIG -= release \
    8. stl \
    9. thread
    10. QT += xml \
    11. opengl
    12. TARGET = ../bin/calina
    13.  
    14. HEADERS += widget.h
    15.  
    16. SOURCES += widget.cpp
    To copy to clipboard, switch view to plain text mode 

    tester.pro
    Qt Code:
    1. TEMPLATE = app
    2.  
    3. CONFIG -= release \
    4. stl \
    5. thread
    6. CONFIG += debug \
    7. opengl
    8. QT += xml \
    9. opengl
    10. INCLUDEPATH += ../calina
    11.  
    12. LIBS += -L../calina \
    13. -l../bin/calina
    14. TARGETDEPS += ../calina/lib../bin/calina.so
    15.  
    16. SOURCES += tester.cpp
    To copy to clipboard, switch view to plain text mode 

    tester.cpp
    Qt Code:
    1. #include "widget.h"
    2.  
    3. int main(int argc, char *argv[])
    4. {
    5.  
    6. calina::Widget widget;
    7. widget.doSomething();
    8.  
    9. return 0;
    10. }
    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?
    Last edited by jacek; 2nd July 2007 at 10:51. Reason: changed [code] to [quote]

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.