In MS VC you can declare to preprocesor how to declare global data:
#pragma data_seg(".gdata")
int i=0;
int z=1;
...
#pragma data_seg()
and then linking with /Section:.gata,WRS
if Borland, I have see the linker has the option of GS to this, but I dont know whats command the compiler need to declare a shared segment of data. The same as MS does not work, so I intuit it has its own declaration.
BCC 5.5 dont have help to look for it.
I need this in order to shared data between a DLL that lanches threads. In normal conditions, each thread make a copy of the variable, so not shared.
Any help ?
thx
#pragma data_seg(".gdata")
int i=0;
int z=1;
...
#pragma data_seg()
and then linking with /Section:.gata,WRS
if Borland, I have see the linker has the option of GS to this, but I dont know whats command the compiler need to declare a shared segment of data. The same as MS does not work, so I intuit it has its own declaration.
BCC 5.5 dont have help to look for it.
I need this in order to shared data between a DLL that lanches threads. In normal conditions, each thread make a copy of the variable, so not shared.
Any help ?
thx