title: how to compile blacklib (c++)
body: <p>I am running a beaglebone and want to write a program to sample the ADC. I am trying to use the blacklib (<a href="http://blacklib.yigityuce.com/index.html" rel="nofollow">http://blacklib.yigityuce.com/index.html</a>) from here. I cloned the git:
  <a href="https://github.com/yigityuce/BlackLib" rel="nofollow">https://github.com/yigityuce/BlackLib</a></p>
  
  <p>and tried to compile the example with </p>
  
  <pre><code>g++ exampleAndTiming.cpp -std=c++11
  </code></pre>
  
  <p>This however gives me a ton of errors like these:</p>
  
  <pre><code>In file included from exampleAndTiming.cpp:33:0:
  exampleAndTiming/exampleAndTiming_GPIO.h: In function 'void exampleAndTiming_GPIO()':
  exampleAndTiming/exampleAndTiming_GPIO.h:97:12: error: 'sleep' was not declared in this scope
       sleep(1);
              ^
  In file included from exampleAndTiming.cpp:34:0:
  exampleAndTiming/exampleAndTiming_ADC.h: In function 'void exampleAndTiming_ADC()':
  exampleAndTiming/exampleAndTiming_ADC.h:67:16: error: 'usleep' was not declared in this scope
       usleep(1000);
                  ^
  </code></pre>
  
  <p>so I include unistd.h (in exampleAndTiming.cpp), but then I get errors like these:</p>
  
  <pre><code>/tmp/ccbgiXE9.o: In function `exampleAndTiming_GPIO()':
  exampleAndTiming.cpp:(.text+0x50): undefined reference to `Timing::startMeasure(std::string)'
  exampleAndTiming.cpp:(.text+0x80): undefined reference to `BlackLib::BlackGPIO::BlackGPIO(BlackLib::gpioName, BlackLib::direction, BlackLib::workingMode)'
  exampleAndTiming.cpp:(.text+0xbc): undefined reference to `Timing::endMeasure(std::string)'
  exampleAndTiming.cpp:(.text+0xec): undefined reference to `BlackLib::BlackGPIO::BlackGPIO(BlackLib::gpioName, BlackLib::direction, BlackLib::workingMode)'
  exampleAndTiming.cpp:(.text+0x104): undefined reference to `BlackLib::BlackGPIO::BlackGPIO(BlackLib::gpioName, BlackLib::direction, BlackLib::workingMode)'
  exampleAndTiming.cpp:(.text+0x11c): undefined reference to `BlackLib::BlackGPIO::BlackGPIO(BlackLib::gpioName, BlackLib::direction, BlackLib::workingMode)'
  exampleAndTiming.cpp:(.text+0x158): undefined reference to `Timing::startMeasure(std::string)'
  </code></pre>
  
  <p>I've been looking at some library examples and compiling it, but I cannot make sense of it all. I've compiled plenty of c++ and c programs before, but I can't get this one to work. So any help will be appreciated.</p>