Hi, I try to declare a shared data segment in a DLL. I declare the area with:
#pragma data_seg(".shared")
int varx=0;
#pragma data_seg()
__declspec(allocate(".shared"))
// I found this declspec suggestion in another forum
#pragma comment (linker,"/section:.shared,RWS")
Also I add
SECTIONS
.shared READ WRITE SHARED
into the def file. However I always get:
LINK : warning LNK4039: section '.shared' specified with /SECTION option does not exist
error. If I do only one (.def or pragma comment) get only one, if do both get two errors.
Anything I miss?