ShiqiYu / libfacedetection

An open source library for face detection in images. The face detection speed can reach 1000FPS.
Other
12.27k stars 3.05k forks source link

undefined reference to symbol 'omp_get_num_threads@@OMP_1.0' #302

Closed aa92478 closed 3 years ago

aa92478 commented 3 years ago

g++ detect-image.cpp -o test pkg-config --cflags --libs opencv -I ../src/ -L ../build/ -lfacedetection /usr/bin/ld: /usr/local/lib/libfacedetection.a(facedetectcnn-model.cpp.o): undefined reference to symbol 'omp_get_num_threads@@OMP_1.0' /usr/bin/ld: //lib/arm-linux-gnueabihf/libgomp.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

fengyuentau commented 3 years ago

Please use cmake to build the project. And probably you are missing flags or options for linking openmp. Try to add flag -fopenmp when compiling and linking.

fengyuentau commented 3 years ago

I used cmake to build the project on my raspberry pi 4b without problems. Please build the project using cmake.