Home > other >  Tip about abnormal dlib Undefined symbols for architecture x86_64 problem.
Tip about abnormal dlib Undefined symbols for architecture x86_64 problem.

Time:10-17

Relatively simple code:

#include
#include
#include
Using the namespace dlib;
Void TestFaceDetect (const char * filename)
{
Frontal_face_detector detector=get_frontal_face_detector ();
Array2d & lt; Unsigned char> Img.
//load_image (img, filename);
//STD: : vector Dets=detector (img);
//printf (" Number of faces detected: % d \ n ", dets. The size ());
}
Int main (int arg c, char * * argv)
{
Const char * filename="test. PNG";
TestFaceDetect (filename);
return 0;
}


Prompt exception is as follows:
====================[Build | dlibTest | Debug]================================
/Applications/CLion app/Contents/bin/cmake/MAC/bin/cmake - build/Users/MAC/Desktop/ai/dlibTest/cmake - build - debug - target dlibTest -- -j 2
[50%] Linking CXX the executable dlibTest
Undefined symbols for architecture x86_64:
"Dlib: : entropy_decoder_kernel_2: : get_target (unsigned int)", referenced from:
Dlib: : compress_stream_kernel_1 & lt; Dlib: : entropy_encoder_model_kernel_5 & lt; 257 ul, dlib: : entropy_encoder_kernel_2, 200000 ul, 4 ul & gt; , dlib: : entropy_decoder_model_kernel_5 & lt; 257 ul, dlib: : entropy_decoder_kernel_2, 200000 ul, 4 ul & gt; , dlib: : crc32 & gt; (STD: : : : decompress __1: : basic_istream & lt; Char, STD: : __1: : char_traits & lt; char> & , STD: : __1: : basic_ostream & lt; Char, STD: : __1: : char_traits & lt; char> & amp;) Const in main1. CPP. O
Dlib: : entropy_decoder_model_kernel_5 & lt; 257 ul, dlib: : entropy_decoder_kernel_2, 200000 ul, 4 ul & gt; : : decode (unsigned long&) In main1. CPP. O
"Dlib: : entropy_decoder_kernel_2: : set_stream (STD: : __1: : basic_istream & lt; Char, STD: : __1: : char_traits & lt; char> & amp;) ", referenced from:
Dlib: : compress_stream_kernel_1 & lt; Dlib: : entropy_encoder_model_kernel_5 & lt; 257 ul, dlib: : entropy_encoder_kernel_2, 200000 ul, 4 ul & gt; , dlib: : entropy_decoder_model_kernel_5 & lt; 257 ul, dlib: : entropy_decoder_kernel_2, 200000 ul, 4 ul & gt; , dlib: : crc32 & gt; (STD: : : : decompress __1: : basic_istream & lt; Char, STD: : __1: : char_traits & lt; char> & , STD: : __1: : basic_ostream & lt; Char, STD: : __1: : char_traits & lt; char> & amp;) Const in main1. CPP. O
"Dlib: : entropy_decoder_kernel_2: : decode (unsigned int, unsigned int)", referenced from:
Dlib: : compress_stream_kernel_1 & lt; Dlib: : entropy_encoder_model_kernel_5 & lt; 257 ul, dlib: : entropy_encoder_kernel_2, 200000 ul, 4 ul & gt; , dlib: : entropy_decoder_model_kernel_5 & lt; 257 ul, dlib: : entropy_decoder_kernel_2, 200000 ul, 4 ul & gt; , dlib: : crc32 & gt; (STD: : : : decompress __1: : basic_istream & lt; Char, STD: : __1: : char_traits & lt; char> & , STD: : __1: : basic_ostream & lt; Char, STD: : __1: : char_traits & lt; char> & amp;) Const in main1. CPP. O
Dlib: : entropy_decoder_model_kernel_5 & lt; 257 ul, dlib: : entropy_decoder_kernel_2, 200000 ul, 4 ul & gt; : : decode (unsigned long&) In main1. CPP. O
"Dlib: : entropy_decoder_kernel_2: : entropy_decoder_kernel_2 ()", referenced from:
Dlib: : compress_stream_kernel_1 & lt; Dlib: : entropy_encoder_model_kernel_5 & lt; 257 ul, dlib: : entropy_encoder_kernel_2, 200000 ul, 4 ul & gt; , dlib: : entropy_decoder_model_kernel_5 & lt; 257 ul, dlib: : entropy_decoder_kernel_2, 200000 ul, 4 ul & gt; , dlib: : crc32 & gt; (STD: : : : decompress __1: : basic_istream & lt; Char, STD: : __1: : char_traits & lt; char> & , STD: : __1: : basic_ostream & lt; Char, STD: : __1: : char_traits & lt; char> & amp;) Const in main1. CPP. O
"Dlib: : entropy_decoder_kernel_2: : ~ entropy_decoder_kernel_2 ()", referenced from:
Dlib: : compress_stream_kernel_1 & lt; Dlib: : entropy_encoder_model_kernel_5 & lt; 257 ul, dlib: : entropy_encoder_kernel_2, 200000 ul, 4 ul & gt; , dlib: : entropy_decoder_model_kernel_5 & lt; 257 ul, dlib: : entropy_decoder_kernel_2, 200000 ul, 4 ul & gt; , dlib: : crc32 & gt; (STD: : : : decompress __1: : basic_istream & lt; Char, STD: : __1: : char_traits & lt; char> & , STD: : __1: : basic_ostream & lt; Char, STD: : __1: : char_traits & lt; char> & amp;) Const in main1. CPP. O
"Dlib: : base64: : base64 ()", referenced from:
Dlib: : get_serialized_frontal_faces () in main1. CPP. O
"Dlib: : base64: : ~ base64 ()", referenced from:
Dlib: : get_serialized_frontal_faces () in main1. CPP. O
"Dlib: : base64: : decode (STD: : __1: : basic_istream & lt; Char, STD: : __1: : char_traits & lt; char> & , STD: : __1: : basic_ostream & lt; Char, STD: : __1: : char_traits & lt; char> & amp;) Const ", referenced from:
Dlib: : get_serialized_frontal_faces () in main1. CPP. O
Ld: symbol (s) not found for architecture x86_64
Clang: error: would the command failed with exit code 1 (use the -v to see invocation)
Make [3] : * * * [dlibTest] Error 1
Make [2] : * * * CMakeFiles/dlibTest. Dir/all Error 2
Make [1] : * * * [rule] CMakeFiles/dlibTest. Dir/Error 2
Make: * * * [dlibTest] Error 2

CodePudding user response:

Add that the MAC OS platform,

CodePudding user response:

I also met my heart tired
  • Related