I'm trying to compile a little test program with Open ALPR as described on https://github.com/openalpr/openalpr/wiki/Integrating-OpenALPR. I've come up with something like:
#include <alpr.h>
#include <iostream>
int main (void)
{
alpr::Alpr openalpr("us", "/etc/openalpr/openalpr.conf");
std::cout << "Hello World!" << std::endl;
return 0;
}
but I am unable to get it to compile. I've tried:
g++ -Wall -l /usr/lib/libopenalpr.so test.cpp -o test
but I get
/usr/bin/ld: cannot find -l/usr/lib/libopenalpr.so
.
/usr/lib/libopenalpr.so
does exist and links to libopenalpr.so.2
, which also exists. What is the correct way to link to this library?