liuliu / ccv

C-based/Cached/Core Computer Vision Library, A Modern Computer Vision Library
http://libccv.org
Other
7.07k stars 1.71k forks source link

linking #157

Open jeremy-rutman opened 8 years ago

jeremy-rutman commented 8 years ago

Hi I'd like to try ccv out, however its been a while since i've compiled C stuff, I apologize for what is probably a ccv-agnostic gcc question. From the tutorial at http://libccv.org/tutorial I downloaded the c code for face recognition and saved as face.c in the /lib directory. Then from the lib directory I tried $gcc face.c -I . -L .
(and also without the -L. ) but run into several errors such as 'undefined reference to ccv_read_impl'

jeremy-rutman commented 8 years ago

after ./configure && make in /lib I also tried clang -L. -I. face.c -lccv cat .deps which produces an a.out that segfaults - tho it seems the make was not entirely happy , it seems to be expecting a git repository...

mrgloom commented 8 years ago

Seems this should help:

extern "C" {
#include "ccv.h"
}