Custom Module as shared library getting unresolved external symbol error

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Nick74044


I’m going through the tutorial on setting up a custom module. I have created a custom module and can successfully build it into the Godot binary. However, when I try and build the module as a shared library, I get a lot of unresolved external symbol errors. I am using Visual Studio 2017, and am just copying the code from the “summator” tutorial. Does anyone know what the issue could be?

Maybe pasting the error here would help with diagnosing the problem?

Ertain | 2018-12-21 19:17

1> : error LNK2019: unresolved external symbol “void __cdecl _err_print_error(char const *,char const *,int,char const *,enum ErrorHandlerType)” (?_err_print_error@@YAXPBD0H0W4ErrorHandlerType@@@Z) referenced in function “public: static void __cdecl ClassDB::register_class(void)” (??$register_class@VSummator@@@ClassDB@@SAXXZ)

1> : error LNK2001: unresolved external symbol “void __cdecl _err_print_error(char const *,char const *,int,char const *,enum ErrorHandlerType)” (?_err_print_error@@YAXPBD0H0W4ErrorHandlerType@@@Z)

There are 51 errors total but they are all either similar to these, LNK2019 or LNK2001, unresolved external symbol, and with one of those 2 object files.

Nick74044 | 2018-12-21 19:27

Hi, I have same problem. Have you solved it?

GD_LoranceChen | 2019-10-03 10:13