shared Memory in a dynamic lib

shared Memory in a dynamic lib

Post by Markus Wenk » Thu, 05 Jun 2003 18:05:38



Hi,

with MSVC++, I can create variables in a dll, that are shared for all
processes using this dll.
can I do this with gcc, or must I use shared memory?

Example:

#pragma data_seg(".x_shared")

int x;

#pragma data_seg()
#pragma comment(linker, "/SECTION:.x_shared,RWS")

 
 
 

shared Memory in a dynamic lib

Post by Kasper Dupon » Thu, 05 Jun 2003 18:41:45



> Hi,

> with MSVC++, I can create variables in a dll, that are shared for all
> processes using this dll.
> can I do this with gcc, or must I use shared memory?

I don't know what you are trying to do, but using shared
memory might be a possible solution.

--
Kasper Dupont -- der bruger for meget tid p? usenet.

for(_=52;_;(_%5)||(_/=5),(_%5)&&(_-=2))putchar(_);