I am trying to solve an LNK4022 issue (not a unique symbol "Initialize" found) but I can't modify the export.def file. The release is a DLL which can only be read by the final software if the export file is respected.
Also my DLL is using the libtorch librairy and I can't modify it either.
1>Export.def : warning LNK4022: impossible de trouver une correspondance unique pour le symbole 'Initialize'
1>Export.def : warning LNK4002: "struct softwareInstanceDetails * __cdecl Initialize(struct softwareEnvironment *,struct MyLocalsoftwareData)" (?Initialize@@YAPEAUsoftwareInstanceDetails@@PEAUsoftwareEnvironment@@UMyLocalsoftwareData@@@Z) défini(e) dans x64\Release\software.obj
1>Export.def : warning LNK4002: "public: void __cdecl torch::jit::tensorexpr::BlockCodeGen::Initialize(void)" (?Initialize@BlockCodeGen@tensorexpr@jit@torch@@QEAAXXZ) défini(e) dans D:\libtorch\lib\torch_cpu.lib 1>Export.def : warning LNK4002: "public: void __cdecl c10::uint128::Initialize(unsigned __int64,unsigned __int64)" (?Initialize@uint128@c10@@QEAAX_K0@Z) défini(e) dans D:\libtorch\lib\c10.lib
1>Export.def : error LNK2001: symbole externe non résolu Initialize
I tried to add extern 'C' in front of the function to avoid to modify the export file and because I though it would add the mangled name of the function during compilation. It didn't work.
Is there anyone who faced and solved this issue before?
Thank you in advance,
Laurick