Bonjour à tous,

j'ai installé correctement opencv et maintenant j'aimerais m'en servir tout en travaillant avec eclipse 3.2.

Pour ce faire, j'ai donc été dans propriétes->C/C++ build puis dans "directories" et ensuite j'ai ajouté le dossier /usr/include/opencv.

Lorsque je fais ça, mes "include" dans mon fichier C ne produisent pas d'erreur par contre toutes les fonctions provenant de ces mêmes librairies ne sont pas reconnues lors de la compilation : "TestVision/Debug/../test.c:22: undefined reference to `cvCreateStructuringElementEx'".


Sauriez-vous m'en dire plus?

Philippe

P.S : j'utilise ubuntu 7.04
Petit aperçu de ce que donne la compilation :
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
Building target: TestVision
Invoking: GCC C Linker
gcc -L/usr/include/opencv -o"TestVision"  ./test.o   
./test.o: In function `OpenClose':
/home/philippe/workspace/TestVision/Debug/../test.c:22: undefined reference to `cvCreateStructuringElementEx'
/home/philippe/workspace/TestVision/Debug/../test.c:25: undefined reference to `cvErode'
/home/philippe/workspace/TestVision/Debug/../test.c:26: undefined reference to `cvDilate'
/home/philippe/workspace/TestVision/Debug/../test.c:30: undefined reference to `cvDilate'
/home/philippe/workspace/TestVision/Debug/../test.c:31: undefined reference to `cvErode'
/home/philippe/workspace/TestVision/Debug/../test.c:33: undefined reference to `cvReleaseStructuringElement'
/home/philippe/workspace/TestVision/Debug/../test.c:34: undefined reference to `cvShowImage'
./test.o: In function `ErodeDilate':
/home/philippe/workspace/TestVision/Debug/../test.c:42: undefined reference to `cvCreateStructuringElementEx'
/home/philippe/workspace/TestVision/Debug/../test.c:45: undefined reference to `cvErode'
/home/philippe/workspace/TestVision/Debug/../test.c:49: undefined reference to `cvDilate'
/home/philippe/workspace/TestVision/Debug/../test.c:51: undefined reference to `cvReleaseStructuringElement'
/home/philippe/workspace/TestVision/Debug/../test.c:52: undefined reference to `cvShowImage'
./test.o: In function `main':
/home/philippe/workspace/TestVision/Debug/../test.c:59: undefined reference to `cvLoadImage'
/home/philippe/workspace/TestVision/Debug/../test.c:69: undefined reference to `cvCloneImage'
/home/philippe/workspace/TestVision/Debug/../test.c:72: undefined reference to `cvNamedWindow'
/home/philippe/workspace/TestVision/Debug/../test.c:73: undefined reference to `cvNamedWindow'
/home/philippe/workspace/TestVision/Debug/../test.c:76: undefined reference to `cvCreateTrackbar'
/home/philippe/workspace/TestVision/Debug/../test.c:77: undefined reference to `cvCreateTrackbar'
/home/philippe/workspace/TestVision/Debug/../test.c:85: undefined reference to `cvWaitKey'
/home/philippe/workspace/TestVision/Debug/../test.c:100: undefined reference to `cvReleaseImage'
/home/philippe/workspace/TestVision/Debug/../test.c:101: undefined reference to `cvReleaseImage'
/home/philippe/workspace/TestVision/Debug/../test.c:104: undefined reference to `cvDestroyWindow'
/home/philippe/workspace/TestVision/Debug/../test.c:105: undefined reference to `cvDestroyWindow'
collect2: ld a retourné 1 code d'état d'exécution
make: *** [TestVision] Erreur 1
make: La cible « all » n'a pas pu être refabriquée à cause d'erreurs.
Build complete for project TestVision