ShiqiYu / ShiqiYu/libfacedetection

How to add to path properly?

Open
#377 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
12.8k
Forks
3k
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the installation output and the include and library paths used to compile detect-camera.cpp. Compare those paths with the installed facedetectcnn.h and libfacedetection.so locations; done means the example's include resolves and the documented compile command succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.