I compile the CPP code which is transformed by IL2CPP.exe with Clang. When i try to use ASAN to scan the CPP code, it shows that:
assembly-CSharp-7f11e8.o : error LNK2019:Unresolved external symbols Create_OnGUI_m5DC49A83F5C9767A5DACD323299CEEFC5A6D4DB0_MetadataUsageId,function Create_OnGUI_m5DC49A83F5C9767A5DACD323299CEEFC5A6D4DB0 referenced in This symbol
assembly-CSharp-7f11e8.o : error LNK2019: Unresolved external symbols "void __cdecl il2cpp_codegen_initialize_method(unsigned int)" (?il2cpp_codegen_initialize_method@@YAXI@Z),
....
My cmd is :
clang assembly-CSharp.cpp -o test.exe -g -fsanitize=address -Xlinker /LIBPATH:“C:\Program Files\LLVM\lib\clang\10.0.0\lib\windows” -Xlinker clang_rt.asan-x86_64.lib -I “C:\Program Files\Unity\Hub\Editor\2019.4.4f1\Editor\Data\il2cpp\libil2cpp” -Xlinker /subsystem:windows