Prog kompiliert nicht. Wie muß ich die libs einbinden ?



  • Hallo !

    Ich muß ein Programm schreiben. Dafür muß ich die it++ Libs benutzen. http://itpp.sourceforge.net/latest/index.html

    Nun ist es so, daß mein Programm zusätzlich QT Widgets benutzt und ich das Makefile mit qmake erzeugt habe. Wenn ich jetzt die it++ Sachen aus meinem Code rausnehme, kompiliert das Programm einwandfrei. Nun binde ich aber nur einen Header von it++ ein mit

    #include <mat.h>
    

    In der Anleitung auf der it++ Seite steht folgendes:

    g++ `pkg-config --cflags itpp` -o my_prog my_prog.cpp `pkg-config --libs itpp`
    

    Oder besser direkt:http://itpp.sourceforge.net/latest/linking.html

    Pkg-config hab ich installiert, das ist kein Prob. Aber leider weiß ich nicht wie und wo ich das ins Makefile einbinden muß damit das kompiliert. WEnn ich das bspw so mache

    #############################################################################
    # Makefile for building: NI_Projekt
    # Generated by qmake (2.00a) (Qt 4.1.0) on: Sa Mai 27 18:16:37 2006
    # Project:  NI_Projekt.pro
    # Template: app
    # Command: /usr/bin/qmake -unix -o Makefile NI_Projekt.pro
    #############################################################################
    
    ####### Compiler, tools and options
    
    CC            = gcc
    CXX           = g++
    LEX           = flex
    YACC          = yacc
    DEFINES       = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
    CFLAGS        = `pkg-config --cflags itpp` -pipe -fno-strict-aliasing -O2 -Wall -W -D_REENTRANT $(DEFINES)
    CXXFLAGS      = [b]`pkg-config --cflags itpp`[/b] -pipe -fno-strict-aliasing -O2 -Wall -W -D_REENTRANT $(DEFINES)
    LEXFLAGS      =
    YACCFLAGS     = -d
    INCPATH       = -I/usr/share/qt/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -I.
    LINK          = g++
    LFLAGS        =
    LIBS          = $(SUBLIBS) [b]`pkg-config --libs itpp`[/b] -L/usr/lib -lQtGui -L/usr/lib -L/usr/X11R6/lib -lpng -lSM -lICE -lXi -lXrender \
    -lXrandr -lXcursor -lXinerama -lfreetype -lfontconfig -lXext -lX11 -lQtCore -lz -lm -ldl -lpthread
    AR            = ar cqs
    RANLIB        =
    QMAKE         = /usr/bin/qmake
    TAR           = tar -cf
    COMPRESS      = gzip -9f
    COPY          = cp -f
    
    usw...
    

    sagt mir make in der Konsole folgendes:

    g++  -c `pkg-config --cflags itpp` -pipe -fno-strict-aliasing -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB 
    -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/default -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -I. -o IcaAssistant.o IcaAssistant.cpp
    [b]IcaAssistant.cpp:5:17: error: mat.h: Datei oder Verzeichnis nicht gefunden[/b]
    make: *** [IcaAssistant.o] Fehler 1
    

    Wie gehts also?



  • Okay ich habs, danke fürs lesen...


Anmelden zum Antworten