Finally found the error, renaming the importing file: generator to sigenerator. With exactly the same code, now it links. But, and this is the oddest think I discovered, recompiling the generator module after the renamed one, the linker error disappeared! Does someone has an explanation?