Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shared segment declaration

Status
Not open for further replies.

bugmenot2

Technical User
Jan 23, 2008
12
0
0
CH
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top