Undefined symbols for architecture x86_64: linking mistake?
<p>I am new to cpp, want to have a implementation of particle filter, I try to run the code here <a href="https://github.com/NewProggie/Particle-Filter" rel="nofollow">https://github.com/NewProggie/Particle-Filter</a>, which is a structured and easy understanding project. But when I try to compile and link:</p>

<pre><code>g++ $(pkg-config --cflags --libs opencv)  -I/usr/local/Cellar/opencv3/3.1.0_1/include -I /usr/local/Cellar/gsl/1.16/include  -stdlib=libc++   main.cpp -o main
</code></pre>

<p>I have following linking problem:</p>

<pre><code>Undefined symbols for architecture x86_64:
"colorFeatures::colorFeatures()", referenced from:
  _main in main-2b4c23.o
"colorFeatures::~colorFeatures()", referenced from:
  _main in main-2b4c23.o
"adaboostDetect::detectObject(_IplImage*, CvRect**)", referenced from:
  _main in main-2b4c23.o
"adaboostDetect::adaboostDetect()", referenced from:
  _main in main-2b4c23.o
"tracker::addObjects(_IplImage*, CvRect*, int)", referenced from:
  _main in main-2b4c23.o
"tracker::initTracker(_IplImage*, CvRect*, int, int)", referenced from:
  _main in main-2b4c23.o
"tracker::showResults(_IplImage*)", referenced from:
  _main in main-2b4c23.o
"tracker::next(_IplImage*)", referenced from:
  _main in main-2b4c23.o
"tracker::tracker()", referenced from:
  _main in main-2b4c23.o
"tracker::~tracker()", referenced from:
  _main in main-2b4c23.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
</code></pre>

<p>Any kind person has ideas about this problem? Thanks in advance</p>