OS/2, eCS & ArcaOS - Technical > Programming
GCC/G++ - how to export global variable without underscore?
Andi B.:
--- Quote ---BTW, libc seems to use _system, not __system__
--- End quote ---
I also wondered where the leading and trailing __ coming from. You see above I used _System which something magically changed to __system__. The same goes with other such attributes. cdecl is converted to __cdecl__ and so on IIRC. If an attribute is not recognized f.i. 'system' the error message is different.
Dave Yeo:
Seems __system__ etc are internal to GCC, no idea what is happening with the errors.
Are you including os2.h? If not, I think you have to include unidef.h for _system
BTW, even using dllexport, you still need a DEF file, just without any exports. Still need the NAME etc to be passed to the linker
Navigation
[0] Message Index
[*] Previous page
Go to full version