Hi
I think you're missing some #pragmas
It looks like compiler generates the standard call for DoGadgetMethod and then it tries to locate it somewhere.
However if this is .library function it should generate different assembler instruction, that should stop the linker complaining.
As an example look at the exec functions:
They're declared as regular functions, but they also have their #pragma entries.
Good luck