IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

C++ Discussion :

[compilation] Makefile erreur (linkage?)


Sujet :

C++

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    88
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Mars 2007
    Messages : 88
    Points : 57
    Points
    57
    Par défaut [compilation] Makefile erreur (linkage?)
    Voila, je dois utiliser une librairie d'une caméra, et j'ai un dernier probleme de linkage dans mon affaire pour l'utiliser (enfin,j'espere que c'est le dernier^^).

    Tout d'abord, mon makefile :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
     
    CC=g++
    EXEC=main
    EXTRAINCLUDEPATH=-I/usr/local/Aria/include/ -I/usr/local/include/opencv -I/usr/local/include/ltilib-1.9.15 
    EXTRALIBPATH=-L/usr/local/Aria/lib/ -L/usr/local/lib -L/usr/local/lib/ltilib-1.9.15
    EXTRALIBS= -lAria -lArNetworking -lArAKin -lcv -lcxcore -lhighgui -lltid -lltir
     
    EXPATH=/home/chris/ltilib/src
     
    all : $(EXEC)
     
    main : ArmUse.o Capture.o Interface.o MatrixCompute.o Robot.o Thread.o main.o
    	@$(CC) ArmUse.o Capture.o Interface.o MatrixCompute.o Robot.o Thread.o main.o -o main $(EXTRALIBS) $(EXTRALIBPATH) `pkg-config gtkmm-2.4 --libs`
     
    ArmUse.o: ArmUse.cpp ArmUse.h
    	@$(CC) ArmUse.cpp -c `pkg-config gtkmm-2.4 --cflags` $(EXTRAINCLUDEPATH)
     
    flwin.o: flwin.cpp flwin.h
    	@$(CC) flwin.cpp -c `pkg-config --cflags` $(EXTRAINCLUDEPATH)
    	@echo "flwin... OK"
     
    Capture.o: Capture.cpp Capture.h Thread.h 
    	@$(CC) Capture.cpp -c `pkg-config --cflags svs44b` $(EXTRAINCLUDEPATH)
    	@echo "Capture... OK"
     
    Interface.o: Interface.cpp ArmUse.h Capture.h MatrixCompute.h Robot.h
    	@$(CC) Interface.cpp -c `pkg-config gtkmm-2.4 --cflags` $(EXTRAINCLUDEPATH)
    	@echo "Interface... OK"		
     
    MatrixCompute.o: MatrixCompute.cpp
    	@$(CC) MatrixCompute.cpp -c `pkg-config gtkmm-2.4 --cflags` $(EXTRAINCLUDEPATH)
    	@echo "MatrixCompute... OK"	
     
    Robot.o: Robot.cpp
    	@$(CC) Robot.cpp -c `pkg-config gtkmm-2.4 --cflags` $(EXTRAINCLUDEPATH)
    	@echo "Robot... OK"	
     
    Thread.o: Thread.cpp 
    	@$(CC) Thread.cpp -c `pkg-config gtkmm-2.4 --cflags` $(EXTRAINCLUDEPATH)
    	@echo "Thread... OK"	
     
    main.o: main.cpp Interface.h
    	@$(CC) main.cpp -c `pkg-config gtkmm-2.4 --cflags` $(EXTRAINCLUDEPATH)
     
    clean:
    	@echo "Removing *.o files and *.jpeg files..."
    	@rm -rf *.o
    	@rm -rf ./main
    	@rm -rf *.jpeg
    	@echo "Ready."
    J'utilise les fichiers svs44b qu'on m'a donné a inclure pour mon projet.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    prefix=SUBST_PREFIX
    exec_prefix=${prefix}
    libdir=${prefix}/lib
    includedir=${prefix}/include
     
    Name: svs44b
    Version: 1
    Description: svs44b
    Cflags: -DUNIX -DLINUX -D_REENTRANT -I. -I${prefix}/include
    Libs: -L${prefix}/lib -lfltk -lsvs -lsvscap -ldcap  -lstdc++ -lpthread -lm -lc
    or avec tout ca, la console me sort ca :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    massin@outil03:~/TestInterface$ make
    Capture... OK
    In file included from Interface.h:19,
                     from Interface.cpp:1:
    Capture.h:25:22: error: svsclass.h: No such file or directory
    In file included from Capture.h:26,
                     from Interface.h:19,
                     from Interface.cpp:1:
    flwin.h:11:19: error: FL/Fl.H: No such file or directory
    flwin.h:12:25: error: FL/Fl_Group.H: No such file or directory
    flwin.h:13:26: error: FL/Fl_Window.H: No such file or directory
    flwin.h:14:24: error: FL/fl_draw.H: No such file or directory
    flwin.h:15:33: error: FL/Fl_Double_Window.H: No such file or directory
    flwin.h:16:27: error: FL/Fl_Browser.H: No such file or directory
    flwin.h:17:34: error: FL/Fl_Overlay_Window.H: No such file or directory
    flwin.h:18:34: error: FL/Fl_Select_Browser.H: No such file or directory
    flwin.h:19:32: error: FL/Fl_Text_Display.H: No such file or directory
    flwin.h:20:31: error: FL/Fl_Text_Buffer.H: No such file or directory
    flwin.h:21:28: error: FL/Fl_Menu_Bar.H: No such file or directory
    flwin.h:22:32: error: FL/Fl_File_Chooser.H: No such file or directory
    flwin.h:30: error: expected class-name before ‘{’ token
    flwin.h:32: error: ‘IMPORT’ does not name a type
    flwin.h:33: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:33: error: expected ‘;’ before ‘void’
    flwin.h:34: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:34: error: expected ‘;’ before ‘void’
    flwin.h:35: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:35: error: expected ‘;’ before ‘void’
    flwin.h:36: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:36: error: expected ‘;’ before ‘void’
    flwin.h:51: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:51: error: expected ‘;’ before ‘void’
    flwin.h:52: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:52: error: expected ‘;’ before ‘void’
    flwin.h:63: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:63: error: expected ‘;’ before ‘int’
    flwin.h:64: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:64: error: expected ‘;’ before ‘int’
    flwin.h:65: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:65: error: expected ‘;’ before ‘int’
    flwin.h:66: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:66: error: expected ‘;’ before ‘int’
    flwin.h:82: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:82: error: expected ‘;’ before ‘int’
    flwin.h:87: error: ‘svsImageParams’ does not name a type
    flwin.h:120: error: expected class-name before ‘{’ token
    flwin.h:127: error: ‘Fl_Color’ has not been declared
    flwin.h:138: error: ‘Fl_Color’ does not name a type
    flwin.h: In member function ‘void Fl_Value::setcolor(int)’:
    flwin.h:127: error: ‘c’ was not declared in this scope
    flwin.h: In member function ‘void Fl_Value::draw()’:
    flwin.h:132: error: ‘color’ was not declared in this scope
    flwin.h:132: error: ‘fl_color’ was not declared in this scope
    flwin.h:133: error: ‘x’ was not declared in this scope
    flwin.h:133: error: ‘y’ was not declared in this scope
    flwin.h:133: error: ‘w’ was not declared in this scope
    flwin.h:133: error: ‘h’ was not declared in this scope
    flwin.h:133: error: ‘fl_rectf’ was not declared in this scope
    flwin.h:134: error: ‘FL_HELVETICA_BOLD’ was not declared in this scope
    flwin.h:134: error: ‘labelsize’ was not declared in this scope
    flwin.h:134: error: ‘fl_font’ was not declared in this scope
    flwin.h:135: error: ‘c’ was not declared in this scope
    flwin.h:136: error: ‘fl_height’ was not declared in this scope
    flwin.h:136: error: ‘fl_descent’ was not declared in this scope
    flwin.h:136: error: ‘fl_draw’ was not declared in this scope
    flwin.h: At global scope:
    flwin.h:145: error: expected class-name before ‘{’ token
    flwin.h:147: error: ‘IMPORT’ does not name a type
    flwin.h:148: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:148: error: expected ‘;’ before ‘void’
    flwin.h:149: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:149: error: expected ‘;’ before ‘void’
    flwin.h:150: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:150: error: expected ‘;’ before ‘bool’
    flwin.h:151: error: ISO C++ forbids declaration of ‘Fl_Text_Display’ with no type
    flwin.h:151: error: expected ‘;’ before ‘*’ token
    flwin.h:152: error: ISO C++ forbids declaration of ‘Fl_Text_Buffer’ with no type
    flwin.h:152: error: expected ‘;’ before ‘*’ token
    flwin.h:157: error: expected constructor, destructor, or type conversion before ‘int’
    make: *** [Interface.o] Error 1
    si je rajoute la ligne suivante dans mes extraincludepath :
    -I/usr/local/FL

    j'obtients:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
     
    In file included from Interface.h:19,
                     from Interface.cpp:1:
    Capture.h:25:22: error: svsclass.h: No such file or directory
    In file included from Capture.h:26,
                     from Interface.h:19,
                     from Interface.cpp:1:
    flwin.h:11:19: error: FL/Fl.H: No such file or directory
    flwin.h:12:25: error: FL/Fl_Group.H: No such file or directory
    flwin.h:13:26: error: FL/Fl_Window.H: No such file or directory
    flwin.h:14:24: error: FL/fl_draw.H: No such file or directory
    flwin.h:15:33: error: FL/Fl_Double_Window.H: No such file or directory
    flwin.h:16:27: error: FL/Fl_Browser.H: No such file or directory
    flwin.h:17:34: error: FL/Fl_Overlay_Window.H: No such file or directory
    flwin.h:18:34: error: FL/Fl_Select_Browser.H: No such file or directory
    flwin.h:19:32: error: FL/Fl_Text_Display.H: No such file or directory
    flwin.h:20:31: error: FL/Fl_Text_Buffer.H: No such file or directory
    flwin.h:21:28: error: FL/Fl_Menu_Bar.H: No such file or directory
    flwin.h:22:32: error: FL/Fl_File_Chooser.H: No such file or directory
    /usr/local/Aria/include/ariaUtil.h: In static member function ‘static double ArMath::cos(double)’:
    /usr/local/Aria/include/ariaUtil.h:376: error: ‘::cos’ has not been declared
    /usr/local/Aria/include/ariaUtil.h: In static member function ‘static double ArMath::sin(double)’:
    /usr/local/Aria/include/ariaUtil.h:384: error: ‘::sin’ has not been declared
    /usr/local/Aria/include/ariaUtil.h: In static member function ‘static double ArMath::tan(double)’:
    /usr/local/Aria/include/ariaUtil.h:391: error: ‘::tan’ has not been declared
    /usr/local/Aria/include/ariaUtil.h: In static member function ‘static double ArMath::atan2(double, double)’:
    /usr/local/Aria/include/ariaUtil.h:400: error: ‘::atan2’ has not been declared
    /usr/local/Aria/include/ariaUtil.h: In static member function ‘static int ArMath::roundInt(double)’:
    /usr/local/Aria/include/ariaUtil.h:442: error: ‘floor’ was not declared in this scope
    /usr/local/Aria/include/ariaUtil.h: In static member function ‘static short int ArMath::roundShort(double)’:
    /usr/local/Aria/include/ariaUtil.h:459: error: ‘floor’ was not declared in this scope
    /usr/local/Aria/include/ariaUtil.h: In static member function ‘static double ArMath::distanceBetween(double, double, double, double)’:
    /usr/local/Aria/include/ariaUtil.h:493: error: ‘sqrt’ was not declared in this scope
    /usr/local/Aria/include/ariaUtil.h: In static member function ‘static double ArMath::log2(double)’:
    /usr/local/Aria/include/ariaUtil.h:513: error: ‘log10’ was not declared in this scope
    /usr/local/Aria/include/ariaUtil.h: In member function ‘virtual double ArPose::findAngleTo(ArPose) const’:
    /usr/local/Aria/include/ariaUtil.h:632: error: ‘atan2’ was not declared in this scope
    /usr/local/Aria/include/ariaUtil.h: In member function ‘bool ArLine::intersects(const ArLine*, ArPose*)’:
    /usr/local/Aria/include/ariaUtil.h:920: error: ‘fabs’ was not declared in this scope
    /usr/local/Aria/include/ArConfigArg.h: At global scope:
    /usr/local/Aria/include/ArConfigArg.h:94: error: ‘HUGE_VAL’ was not declared in this scope
    /usr/local/Aria/include/ArConfigArg.h:95: error: ‘HUGE_VAL’ was not declared in this scope
    /usr/local/Aria/include/ArConfigArg.h:111: error: ‘HUGE_VAL’ was not declared in this scope
    /usr/local/Aria/include/ArConfigArg.h:112: error: ‘HUGE_VAL’ was not declared in this scope
    /usr/local/Aria/include/ArArg.h:76: error: ‘HUGE_VAL’ was not declared in this scope
    /usr/local/Aria/include/ArArg.h:77: error: ‘HUGE_VAL’ was not declared in this scope
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:100: error: ‘::acos’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:117: error: ‘::asin’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:132: error: ‘::atan’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:147: error: ‘::atan2’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:163: error: ‘::ceil’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:178: error: ‘::cos’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:193: error: ‘::cosh’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:208: error: ‘::exp’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:223: error: ‘::fabs’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:238: error: ‘::floor’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:253: error: ‘::fmod’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:263: error: ‘::frexp’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:278: error: ‘::ldexp’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:293: error: ‘::log’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:308: error: ‘::log10’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:323: error: ‘::modf’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:342: error: ‘::pow’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:364: error: ‘::sin’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:379: error: ‘::sinh’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:394: error: ‘::sqrt’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:409: error: ‘::tan’ has not been declared
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:424: error: ‘::tanh’ has not been declared
    /usr/local/include/ltilib-1.9.15/ltiSinCos.h: In function ‘void lti::sincos_impl(double, double&, double&)’:
    /usr/local/include/ltilib-1.9.15/ltiSinCos.h:62: error: ‘::sincos’ has not been declared
    /usr/local/include/ltilib-1.9.15/ltiSinCos.h: In function ‘void lti::sincosf_impl(float, float&, float&)’:
    /usr/local/include/ltilib-1.9.15/ltiSinCos.h:70: error: ‘::sincosf’ has not been declared
    /usr/local/include/ltilib-1.9.15/ltiMath.h: At global scope:
    /usr/local/include/ltilib-1.9.15/ltiMath.h:357: error: ‘log’ was not declared in this scope
    /usr/local/include/ltilib-1.9.15/ltiMath.h:364: error: ‘tan’ was not declared in this scope
    /usr/local/include/ltilib-1.9.15/ltiMath.h: In function ‘int lti::sqrt(int)’:
    /usr/local/include/ltilib-1.9.15/ltiMath.h:562: error: ‘::sqrt’ has not been declared
    /usr/local/include/ltilib-1.9.15/ltiMath.h: In function ‘unsigned int lti::sqrt(unsigned int)’:
    /usr/local/include/ltilib-1.9.15/ltiMath.h:571: error: ‘::sqrt’ has not been declared
    /usr/local/include/ltilib-1.9.15/ltiMath.h: In function ‘double lti::sqrt(const double&)’:
    /usr/local/include/ltilib-1.9.15/ltiMath.h:602: error: call of overloaded ‘sqrt(const double&)’ is ambiguous
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:397: note: candidates are: float std::sqrt(float)
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:401: note:                 long double std::sqrt(long double)
    /usr/local/include/ltilib-1.9.15/ltiMath.h: In function ‘double lti::sigmoid(const double&)’:
    /usr/local/include/ltilib-1.9.15/ltiMath.h:994: error: call of overloaded ‘exp(double)’ is ambiguous
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:215: note: candidates are: long double std::exp(long double)
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:211: note:                 float std::exp(float)
    /usr/local/include/ltilib-1.9.15/ltiMath.h: In function ‘double lti::sigmoid(int)’:
    /usr/local/include/ltilib-1.9.15/ltiMath.h:1003: error: call of overloaded ‘exp(double)’ is ambiguous
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:215: note: candidates are: long double std::exp(long double)
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:211: note:                 float std::exp(float)
    /usr/local/include/ltilib-1.9.15/ltiMath_template.h: In function ‘T lti::lnGamma(const T&)’:
    /usr/local/include/ltilib-1.9.15/ltiMath_template.h:54: error: call of overloaded ‘log(double&)’ is ambiguous
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:300: note: candidates are: long double std::log(long double)
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:296: note:                 float std::log(float)
    /usr/local/include/ltilib-1.9.15/ltiMath_template.h:60: error: call of overloaded ‘log(double&)’ is ambiguous
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:300: note: candidates are: long double std::log(long double)
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:296: note:                 float std::log(float)
    /usr/local/include/ltilib-1.9.15/ltiMath_template.h: In function ‘T lti::betai(const T&, const T&, const T&)’:
    /usr/local/include/ltilib-1.9.15/ltiMath_template.h:80: error: call of overloaded ‘log(const double&)’ is ambiguous
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:300: note: candidates are: long double std::log(long double)
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:296: note:                 float std::log(float)
    /usr/local/include/ltilib-1.9.15/ltiMath_template.h:80: error: call of overloaded ‘log(double&)’ is ambiguous
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:300: note: candidates are: long double std::log(long double)
    /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/cmath:296: note:                 float std::log(float)
    flwin.h: At global scope:
    flwin.h:30: error: expected class-name before ‘{’ token
    flwin.h:32: error: ‘IMPORT’ does not name a type
    flwin.h:33: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:33: error: expected ‘;’ before ‘void’
    flwin.h:34: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:34: error: expected ‘;’ before ‘void’
    flwin.h:35: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:35: error: expected ‘;’ before ‘void’
    flwin.h:36: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:36: error: expected ‘;’ before ‘void’
    flwin.h:51: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:51: error: expected ‘;’ before ‘void’
    flwin.h:52: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:52: error: expected ‘;’ before ‘void’
    flwin.h:63: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:63: error: expected ‘;’ before ‘int’
    flwin.h:64: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:64: error: expected ‘;’ before ‘int’
    flwin.h:65: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:65: error: expected ‘;’ before ‘int’
    flwin.h:66: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:66: error: expected ‘;’ before ‘int’
    flwin.h:82: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:82: error: expected ‘;’ before ‘int’
    flwin.h:87: error: ‘svsImageParams’ does not name a type
    flwin.h:120: error: expected class-name before ‘{’ token
    flwin.h:127: error: ‘Fl_Color’ has not been declared
    flwin.h:138: error: ‘Fl_Color’ does not name a type
    flwin.h: In member function ‘void Fl_Value::setcolor(int)’:
    flwin.h:127: error: ‘c’ was not declared in this scope
    flwin.h: In member function ‘void Fl_Value::draw()’:
    flwin.h:132: error: ‘color’ was not declared in this scope
    flwin.h:132: error: ‘fl_color’ was not declared in this scope
    flwin.h:133: error: ‘x’ was not declared in this scope
    flwin.h:133: error: ‘y’ was not declared in this scope
    flwin.h:133: error: ‘w’ was not declared in this scope
    flwin.h:133: error: ‘h’ was not declared in this scope
    flwin.h:133: error: ‘fl_rectf’ was not declared in this scope
    flwin.h:134: error: ‘FL_HELVETICA_BOLD’ was not declared in this scope
    flwin.h:134: error: ‘labelsize’ was not declared in this scope
    flwin.h:134: error: ‘fl_font’ was not declared in this scope
    flwin.h:135: error: ‘c’ was not declared in this scope
    flwin.h:136: error: ‘fl_height’ was not declared in this scope
    flwin.h:136: error: ‘fl_descent’ was not declared in this scope
    flwin.h:136: error: ‘fl_draw’ was not declared in this scope
    flwin.h: At global scope:
    flwin.h:145: error: expected class-name before ‘{’ token
    flwin.h:147: error: ‘IMPORT’ does not name a type
    flwin.h:148: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:148: error: expected ‘;’ before ‘void’
    flwin.h:149: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:149: error: expected ‘;’ before ‘void’
    flwin.h:150: error: ISO C++ forbids declaration of ‘IMPORT’ with no type
    flwin.h:150: error: expected ‘;’ before ‘bool’
    flwin.h:151: error: ISO C++ forbids declaration of ‘Fl_Text_Display’ with no type
    flwin.h:151: error: expected ‘;’ before ‘*’ token
    flwin.h:152: error: ISO C++ forbids declaration of ‘Fl_Text_Buffer’ with no type
    flwin.h:152: error: expected ‘;’ before ‘*’ token
    flwin.h:157: error: expected constructor, destructor, or type conversion before ‘int’
    make: *** [Interface.o] Error 1
    donc voila, en gros, si j'ai bien comprit, c'est parce qu'il ne trouve pas les librairies associés qu'il y a un probleme, mais je ne comprends pas comment lié la librairie a flwin, car celle ci déconne.

    Merci de votre aide

  2. #2
    Membre régulier
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    80
    Détails du profil
    Informations personnelles :
    Âge : 41
    Localisation : France, Territoire de Belfort (Franche Comté)

    Informations forums :
    Inscription : Mars 2006
    Messages : 80
    Points : 77
    Points
    77
    Par défaut
    Tes erreurs me semble toute due à des problémes de linkage et là je peu pas trop t'aider -_-.
    Je te propose de compiler tes classes séparement (à la main s'il le faut).
    Par exemple pour ta classe Robot tu la compile avec les bonnes options et les bonnes librairies.
    Quand t'a une erreur du type :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Capture.h:25:22: error: svsclass.h: No such file or directory
    c'est que ton au niveau de Capture.h n'est pas bon
    tu donne pas le bon chemin au compilateur pour qu'il trouve ton svsclass.h
    Aprés pour le reste je ne sais pas.
    Bon courage

  3. #3
    Membre éclairé Avatar de valefor
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    711
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 711
    Points : 790
    Points
    790
    Par défaut
    Je ne pense pas que ce soit un problème de link mais de compile.

    Tu as vérifié l'existence du fichier svsclass.h dans tous tes path spécifiés par '-I' ?

  4. #4
    Membre du Club
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    88
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Mars 2007
    Messages : 88
    Points : 57
    Points
    57
    Par défaut
    en fait le path pour svsclass est spécifié dans le fichier svs44b. Maintneant, je ne pige pas trop ce tpe de makefile qu'on inclut dans la ligne de commande, mais le path vers lequel il doit faire référence est usr/local/svs . Je ne sais meme pas si ca le link bien ou pas comme ca :s

  5. #5
    Membre éclairé Avatar de valefor
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    711
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2006
    Messages : 711
    Points : 790
    Points
    790
    Par défaut
    Tu pourrais faire en sorte d'afficher les lignes de compile en virant les @. tu verrais ce qui est fait exactement.

    Après je ne sais pas trop comment fonctionne pkg-config, mais je suppose qu'il va chercher les infos qui sont dans ton fichier svs44b c'est ça ? Il fait lui même la substitution de la variable SUBST_PREFIX ?

  6. #6
    Membre du Club
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    88
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Mars 2007
    Messages : 88
    Points : 57
    Points
    57
    Par défaut
    c'est la question que je me pose, je sais pas ou il le prends son subprefix. je vais tenter de voir les lignes sans les @

  7. #7
    Membre éprouvé
    Profil pro
    Inscrit en
    Mars 2005
    Messages
    865
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2005
    Messages : 865
    Points : 1 069
    Points
    1 069
    Par défaut
    Ce n'est pas pkg-config qui fait la substitution de SUBST_PREFIX.

    Normalement, svs44b (extension.pc normalement) est un fichier qui doit être généré lors de la compilation de la librairie svs44b et c'est cette première compilation qui fait la substitution, en fonction du préfixe où tu as dit que tu allais installer la librairie.

    Etant donné qu'on t'a filé les fichiers (mais que ce n'est pas toi qui l'as compilé et installé) tu dois réaliser cette substitution à la main.

    Tu installes ces fichiers où tu veux et où tu peux et tu renseignes la variable prefix de telle manière qu'elle corresponde à l'arborescence suivante.

    <prefix>/include/<tous mes headers livrés>
    <prefix>/lib/<la librairie svs44b>

    Ensuite pkg-config doit savoir où se trouve le fichier svs44b.pc
    S'il n'est pas à un endroit standard (/usr/lib/pkgconfig), tu dois modifier la variable PKG_CONFIG_PATH.
    Pour tester que ton installation est bonne, tu fait "pkg-config --list-all" jusqu'à ce svs44b apparaisse dans la liste. Grep si nécessaire.

    J'espère que ça pourra déjà aider.

  8. #8
    Membre du Club
    Profil pro
    Inscrit en
    Mars 2007
    Messages
    88
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Mars 2007
    Messages : 88
    Points : 57
    Points
    57
    Par défaut
    Merci ! oui, en effet, ca m'a bien aidé ^ ^ ca m'a mis sur la voix, en fait le svs44b etait bien dans le pkg config, mais somme toute c'etait une version ou le subset ne pointait pas vers le bon fichier, et l'arborescence n'etait pas respecté dans les fichiers sur lequel il pointait ^ ^

    Bon, mtn il me reste jusste une petite erreur :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
     
    massin@outil03:~/TestInterface$ make
    ArmUse... OK
    flwin... OK
    In file included from /home/massin/usr/svs44b/include/svsclass.h:44,
                     from Capture.h:25,
                     from Capture.cpp:1:
    /home/massin/usr/svs44b/include/svs.h:58:1: warning: "FALSE" redefined
    In file included from /usr/lib/glib-2.0/include/glibconfig.h:9,
                     from /usr/include/glib-2.0/glib/gtypes.h:30,
                     from /usr/include/glib-2.0/glib/galloca.h:30,
                     from /usr/include/glib-2.0/glib.h:30,
                     from /usr/include/glib-2.0/gobject/gtype.h:26,
                     from /usr/include/glib-2.0/gobject/gboxed.h:26,
                     from /usr/include/glib-2.0/glib-object.h:25,
                     from /usr/include/glibmm-2.4/glibmm/containerhandle_shared.h:31,
                     from /usr/include/glibmm-2.4/glibmm/arrayhandle.h:24,
                     from /usr/include/glibmm-2.4/glibmm.h:27,
                     from /usr/include/gtkmm-2.4/gtkmm.h:29,
                     from Capture.h:18,
                     from Capture.cpp:1:
    /usr/include/glib-2.0/glib/gmacros.h:159:1: warning: this is the location of the previous definition
    In file included from /home/massin/usr/svs44b/include/svsclass.h:44,
                     from Capture.h:25,
                     from Capture.cpp:1:
    /home/massin/usr/svs44b/include/svs.h:59:1: warning: "TRUE" redefined
    In file included from /usr/lib/glib-2.0/include/glibconfig.h:9,
                     from /usr/include/glib-2.0/glib/gtypes.h:30,
                     from /usr/include/glib-2.0/glib/galloca.h:30,
                     from /usr/include/glib-2.0/glib.h:30,
                     from /usr/include/glib-2.0/gobject/gtype.h:26,
                     from /usr/include/glib-2.0/gobject/gboxed.h:26,
                     from /usr/include/glib-2.0/glib-object.h:25,
                     from /usr/include/glibmm-2.4/glibmm/containerhandle_shared.h:31,
                     from /usr/include/glibmm-2.4/glibmm/arrayhandle.h:24,
                     from /usr/include/glibmm-2.4/glibmm.h:27,
                     from /usr/include/gtkmm-2.4/gtkmm.h:29,
                     from Capture.h:18,
                     from Capture.cpp:1:
    /usr/include/glib-2.0/glib/gmacros.h:163:1: warning: this is the location of the previous definition
    In file included from /home/massin/usr/svs44b/include/svsclass.h:44,
                     from Capture.h:25,
                     from Capture.cpp:1:
    /home/massin/usr/svs44b/include/svs.h:317:1: warning: "ABS" redefined
    In file included from /usr/lib/glib-2.0/include/glibconfig.h:9,
                     from /usr/include/glib-2.0/glib/gtypes.h:30,
                     from /usr/include/glib-2.0/glib/galloca.h:30,
                     from /usr/include/glib-2.0/glib.h:30,
                     from /usr/include/glib-2.0/gobject/gtype.h:26,
                     from /usr/include/glib-2.0/gobject/gboxed.h:26,
                     from /usr/include/glib-2.0/glib-object.h:25,
                     from /usr/include/glibmm-2.4/glibmm/containerhandle_shared.h:31,
                     from /usr/include/glibmm-2.4/glibmm/arrayhandle.h:24,
                     from /usr/include/glibmm-2.4/glibmm.h:27,
                     from /usr/include/gtkmm-2.4/gtkmm.h:29,
                     from Capture.h:18,
                     from Capture.cpp:1:
    /usr/include/glib-2.0/glib/gmacros.h:173:1: warning: this is the location of the previous definition
    Capture... OK
    Interface... OK
    MatrixCompute... OK
    Robot... OK
    Thread... OK
    main... OK
    ensuite les fichiers capture.h

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    #undef FALSE
    #undef TRUE
    #undef ABS
     
    #include <gtkmm.h>
    #include <cv.h>
     
    #include <stdio.h>
    #include <string>
    #include <fstream>
     
    #include "svsclass.h"
    #include "flwin.h"
     
    #include <stdexcept>
    #include <sstream>
     
    #include "Thread.h"
     
     
     
    using namespace std;
     
    class Capture : public Threads
    {
     
    public :
    	Capture(Gtk::Image* picture);
    	void setKeep(); // Stop Thread
    private :	
    	IplImage* frame; // Frame to get the capture from camera
    //	CvCapture* capture; // Capture from camera
    	bool keep; // bool to maintain the thread
    	Gtk::Image* image; // image from the interface where the frame will be displayed	
    	virtual void runCapture(); // Method reimplemented from thread.
    //	string getText(int i);
    et capture .cpp

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
     #include "Capture.h"
     
     
     
    /*
     * Constructor. 
     *
     */
    Capture::Capture(Gtk::Image* picture) : 
    							frame(),
    							keep(true)
    {
    	image=picture;	
    }
     
     
     
    void Capture::runCapture()
    {
      bool ret;
     
     
      svsAcquireImages *sourceObject; // source of images
     
     
      // ********** Ouverture et début de capture *************************
     
     
        sourceObject = (svsAcquireImages *)getVideoObject(); 
     
     
     
      ret = sourceObject->Open(NULL);
      if (!ret)
      {
    	printf("erreur\n");
        check_exit();
        exit(0);
      }
     
     
        ((svsVideoImages *)sourceObject)->SetColor(true, true);
        ((svsVideoImages *)sourceObject)->SetRate(7);
        ((svsVideoImages *)sourceObject)->SetSize(640, 480);
     
     
     
      ret = sourceObject->Start();
      if (!ret)
      {
    	printf("erreur\n");
        check_exit();
        exit(0);
      }
     
     
      // ****************** Do acquisition and display *****************
     
      svsStereoImage *si;		// this holds the current frame
     
     
      int count = 0;
      while (keep)
      {
        // get the next frame
     
        si = sourceObject->GetImage(500);
        if (si == NULL)
        {
     
          check_exit();
        exit(0);
        }
     
     
        si->SaveToFile("samplefile");
        image->set("samplefile-R.bmp");
     
     
      }
     
      // if the previous loop isn't infinite, close the source.
      sourceObject->Close();
    }
     
     
    void Capture::setKeep()
    {
    	keep=false;
    }
     
    /*
    string Capture::getText(int i)
    {
    	string text;
    	ostringstream oss;
     
    	// make the string for the filename
     	text="image";
    	oss << i;
    	text+=oss.str();
    	oss.str("");
    	text+=".jpeg";
     
    	return text;
    }
    */
     
    // exiting
     
    void Capture::check_exit()
    {
      while (fltk_check()) {}
      exit(0);
    }
    je pensais que l'erreur était lié au fait qu'il y avait une redéfinition, et j'ai fait les undefs, mais depuis les derniers changement ca se reproduit a nouveau, et je pige pas trop pourquoi, vu que c'est undef :s

Discussions similaires

  1. Erreur compilation makefile
    Par mahrouch1667 dans le forum Autres éditeurs
    Réponses: 1
    Dernier message: 17/02/2012, 17h47
  2. Erreur linkage lors de la compilation d'OpenSSL
    Par Fooshi dans le forum Visual Studio
    Réponses: 1
    Dernier message: 01/12/2010, 17h18
  3. [Ocaml][compilation] glGtk, erreur de linkage !
    Par kulssaka dans le forum Caml
    Réponses: 14
    Dernier message: 30/12/2009, 20h02
  4. [COMPILATION][SERVLET]Erreur dans une servlet
    Par casho dans le forum Servlets/JSP
    Réponses: 1
    Dernier message: 04/09/2006, 19h40
  5. Réponses: 4
    Dernier message: 30/04/2004, 13h14

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo