Thanks to ChatGPT, the problem was because I was including the library on a extern "C" section, moving outside solved the problem.