Giter VIP home page Giter VIP logo

Comments (1)

Qengineering avatar Qengineering commented on August 22, 2024

You have to tell g++ where it can find all the headers, libraries and other dependencies. Perhaps only a 'Hello World' could run without any other information.
Second, once g++ has compiled the individual cpp files, you get object files. All these need to be linked together with the linker.

The commands you should have used are:

g++ -Wall -fexceptions -pthread -O3 -I/usr/local/include/opencv4 -I/usr/local/include/ncnn -c FaceDetector.cpp -o FaceDetector.o
g++ -Wall -fexceptions -pthread -O3 -I/usr/local/include/opencv4 -I/usr/local/include/ncnn -c main.cpp -o main.o
g++ -L/usr/local/lib/ -o FaceLandmark FaceDetector.o main.o  -I/usr/local/include/opencv4 -L/usr/local/lib -lopencv_gapi -lopencv_stitching -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hdf -lopencv_hfs -lopencv_img_hash -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_mcc -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_highgui -lopencv_datasets -lopencv_text -lopencv_plot -lopencv_videostab -lopencv_videoio -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_video -lopencv_dnn -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core -pthread -fopenmp -s  /usr/local/lib/ncnn/libncnn.a

You get the following output:
image
FaceLandmark is your exe.

Even with a relatively simple program like this, working with the command prompt is a source of typos and other errors.
You need a kind of compile manager. That is why we advise you to use the free Code::Blocks.
See our site for more details on how to work with Code::Blocks.

from face-detection-landmark-raspberry-pi-32-64-bits.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.