Re: [anjuta-list] Is something like this exists for gcc/configure & friends



Hi Igor,


Le 13/04/2016 21:38, Igor Korot a écrit :
In Windows I can write a special file (.def file) where I can choose the name of
my exported functions. Or I can use /EXPORT linker option to give the linker
those names explicitly.
Is such functionality exists in the gcc realm? Either as a command line linker
option, an __attribute__ directive or #pragma directive?

gcc realm is easier, this functionality doesn't exist because all functions are exported.


I'm trying to avoid writing 'extern "C"' for every exported function
in the .so file...

extern "C" is quite different, it's used to tag a function as C in a C++ program.


But since C++ will mangle the names I want to keep the names as they are written
in the source code.

I think you can use mangled in shared libraries too.


Best Regards,

Sébastien


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]