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
I dont know how to do this on Borland. I saw the linker has the option, but dont know the commands in the code (the above only run in microsoft, no borland). Not help in help files of bcc55. difficult question
I am programming a DLL that launches threads. In DLL, when a thread is launched they have its own global variables copy, so not shared data between them. The solution is declare a data segment shared, as MS do.
Does anybody know how can I do this in borland? maybe any workaround if not possible.?
thx.
#pragma data_seg(".gdata")
int i=0;
int z=1;
...
#pragma data_seg()
and then linking with /Section:.gata,WRS
I dont know how to do this on Borland. I saw the linker has the option, but dont know the commands in the code (the above only run in microsoft, no borland). Not help in help files of bcc55. difficult question
I am programming a DLL that launches threads. In DLL, when a thread is launched they have its own global variables copy, so not shared data between them. The solution is declare a data segment shared, as MS do.
Does anybody know how can I do this in borland? maybe any workaround if not possible.?
thx.