0

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?

nanofarad
  • 40,330
  • 4
  • 86
  • 117
stdcerr
  • 13,725
  • 25
  • 71
  • 128
  • Possible duplicate of [usr/bin/ld: cannot find -l](https://stackoverflow.com/questions/16710047/usr-bin-ld-cannot-find-lnameofthelibrary) – Mike Kinghan Jul 22 '18 at 07:18

1 Answers1

0

The answer can be found here: unable to compile with library

stdcerr
  • 13,725
  • 25
  • 71
  • 128