Sharing Data between DLLs

I have dll, common.dll, which has global data. I want to share this global data with another dll. I've set the linker options on the common.dll as follows:

/SECTION:.bss, rws /SECTION:.data, rws.

When I step into the code it appears that both dlls have their own copy of the global data. What am I doing wrong?

Thanks.

Omar Canon

[366 byte] By [ocanon] at [2007-12-21]
# 1
Use #pragma dataseg(".shared") in the source code. See this webpage and this webpage for a examples.

nobugz at 2007-9-10 > top of Msdn Tech,Visual C++,Visual C++ Language...
# 2
Doesn't the /SECTION compiler flag do the same thing?
ocanon at 2007-9-10 > top of Msdn Tech,Visual C++,Visual C++ Language...
# 3
No. Check the docs.
nobugz at 2007-9-10 > top of Msdn Tech,Visual C++,Visual C++ Language...