Problème d'insertion avec OpenCV
Bonjour,
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 Proprietes > 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 bibliothèques ne sont pas reconnues lors de la compilation :
Citation:
TestVision/Debug/../test.c:22: undefined reference to `cvCreateStructuringElementEx'
J'utilise Ubuntu 7.04
Voici ce que donne la compilation :
Citation:
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
Quelqu'un saurait-il m'indiquer comment résoudre ce problème ?
Merci d'avance pour votre aide.