libfacedetection icon indicating copy to clipboard operation
libfacedetection copied to clipboard

How to add to path properly?

Open maifeeulasad opened this issue 9 months ago • 0 comments

I have followed the build and installtion instruction and it's working just fine:

-- Configuring done
-- Generating done
-- Build files have been written to: /home/maifeevm25apr/libfacedetection/build
[ 25%] Building CXX object CMakeFiles/facedetection.dir/src/facedetectcnn-data.cpp.o
[ 50%] Building CXX object CMakeFiles/facedetection.dir/src/facedetectcnn-model.cpp.o
[ 75%] Building CXX object CMakeFiles/facedetection.dir/src/facedetectcnn.cpp.o
[100%] Linking CXX shared library libfacedetection.so
[100%] Built target facedetection
Consolidate compiler generated dependencies of target facedetection
[100%] Built target facedetection
Install the project...
-- Install configuration: "Release"
-- Installing: /home/maifeevm25apr/libfacedetection/build/install/lib/libfacedetection.so.v0.0.3
-- Installing: /home/maifeevm25apr/libfacedetection/build/install/lib/libfacedetection.so
-- Installing: /home/maifeevm25apr/libfacedetection/build/install/include/facedetection/facedetectcnn.h
-- Installing: /home/maifeevm25apr/libfacedetection/build/install/include/facedetection/facedetection_export.h
-- Installing: /home/maifeevm25apr/libfacedetection/build/install/lib/cmake/facedetection/facedetectionConfig.cmake
-- Installing: /home/maifeevm25apr/libfacedetection/build/install/lib/cmake/facedetection/facedetectionConfig-release.cmake
-- Installing: /home/maifeevm25apr/libfacedetection/build/install/lib/cmake/facedetection/facedetectionConfigVersion.cmake

But the issue is when I try to compile an example:

g++ -o detect-camera detect-camera.cpp \
    -I../include -I/usr/include/opencv4 \
    -L../lib -lfacedetectcnn \
    `pkg-config --cflags --libs opencv4`

It give me the following error:

detect-camera.cpp:41:10: fatal error: facedetectcnn.h: No such file or directory
   41 | #include "facedetectcnn.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.

How can I resolve this issue?

maifeeulasad avatar Apr 07 '25 08:04 maifeeulasad