vtable - Serbipunk/notes GitHub Wiki


CMakeupExtractByModel.cpp:(.text+0x290): undefined reference to `vtable for std::_Sp_counted_ptr_inplace<ExtractionShaderManager, std::allocator<ExtractionShaderManager>, (__gnu_cxx::_Lock_policy)2>'
/usr/bin/ld: modules/ilab-makeup-transfer-sdk-extract/libilab-makeup-transfer-sdk-extract.a(CMakeupExtractByModel.cpp.o): relocation R_X86_64_PC32 against undefined hidden symbol `_ZTVSt23_Sp_counted_ptr_inplaceI23ExtractionShaderManagerSaIS0_ELN9__gnu_cxx12_Lock_policyE2EE' can not be used when making a shared object

ld error when using make_shared (implicit way)

solution

explicit way (shared_ptr(new obj))

⚠️ **GitHub.com Fallback** ⚠️