Ask Your Question
0

How to use cvBlobsLib in OpenCv Ubuntu

asked 2013-02-01 15:28:46 -0500

zweistein gravatar image

updated 2013-02-02 11:23:23 -0500

sammy gravatar image

I built the cvblobslib int the opencv lib folder and i included the header file to my main.cpp. However all my tires and google search I cant find how to make it work. when I create a CBlobResult variable, after make i get this error:

CMakeFiles/bag.dir/main.o: In function `main':
main.cpp:(.text+0x28d): undefined reference to `CBlobResult::CBlobResult()'
main.cpp:(.text+0x3de): undefined reference to `CBlobResult::~CBlobResult()'
main.cpp:(.text+0x3fd): undefined reference to `CBlobResult::~CBlobResult()'
collect2: ld returned 1 exit status
make[2]: *** [bag] Error 1
make[1]: *** [CMakeFiles/bag.dir/all] Error 2
make: *** [all] Error 2

I think the problem is that the linker can't find the cvblobslib package. I'm using cmake file but i have no idea how to solve this problem.

edit retag flag offensive close merge delete

Comments

This is not a linker problem. This is the compiler unable to find the header file. You will need to specify the location of header file to the compiler.

unxnut gravatar imageunxnut ( 2013-02-02 21:34:53 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-02-01 22:44:17 -0500

unxnut gravatar image

This looks like you are not able to find the header file. In your compilation, you can add the location of the directory containing the header with -I flag. Make sure that there is no space between -I and the location.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-02-01 15:28:46 -0500

Seen: 641 times

Last updated: Feb 02 '13