Building with jetson_inference/Coding Your Own Image Recognition Program (C++)fails

Hello everyone,

I am working on a Jetson orin nx with the Jetpack (5.1.2). I wish to use the jetson-inference library in my own projects and applications, then I follow the example( jetson_inference/Coding Your Own Image Recognition Program (C++)).
But building with the example,make reports:

Scanning dependencies of target my-recognition
[ 50%] Building CXX object CMakeFiles/my-recognition.dir/my-recognition.cpp.o
[100%] Linking CXX executable my-recognition
/usr/bin/ld: cannot find -lvpi
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/my-recognition.dir/build.make:90:my-recognition] error 1
make[1]: *** [CMakeFiles/Makefile2:76:CMakeFiles/my-recognition.dir/all] error 2
make: *** [Makefile:84:all] error 2

can someone help me to solve it?

Hi,

This indicates a missing library in your environment.
The VPI library can be installed with the below command:

$ sudo apt install nvidia-vpi-dev

Thanks.

Thanks for your help.
My jetson has installed the vpi2. When I add “find_package(VPI 2.0)” in the CMakeLists.txt, the program can be run.