Skip to content

How to add to path properly? #377

@maifeeulasad

Description

@maifeeulasad

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions