simple DevCpp question
Hi, i moved from vc to devcpp, and have a little problem to port one of my old projects.
The problem is that this project uses a dll with a shared section in it. Under vc, it was as simple as adding a few pragmas to get the shared section working, like this :
// variables shared across all instances of the dll
#pragma data_seg("SHARED")
#pragma comment (linker, "/SECTION:SHARED,RWS")
HHOOK HookHandle = 0;
int DllLoadCount = 0;
char ExecutionPath[257] = "";
#pragma data_seg()
Now, these pragmas don't seem to work with devcpp. The devcpp documentation i have is pretty poor. I also tried google, but it looks like i got a lot unrelated answers..
Would be nice if someone could point me in the right direction.
Cheers, thanks.
Dev-Cpp's documentation isn't so good because it's just an IDE, it uses the MinGW compiler, [google], I don't know much about DLLs, but couldn't you just use extern?
i really don't like the gcc docs, quite hard to read.
also the word "shared" seems to apear everywhere in the options, that doesn't help to find a relevant answer..
thanks, i'm going to investigate in the mingw and gnu compilers docs.
i don't think i can use extern here, extern is to share data at compile time between compilation units. what i want is to have a data section shared by all the instances of the loaded dll at run time.
thanks a lot.
also the word "shared" seems to apear everywhere in the options, that doesn't help to find a relevant answer..
thanks, i'm going to investigate in the mingw and gnu compilers docs.
i don't think i can use extern here, extern is to share data at compile time between compilation units. what i want is to have a data section shared by all the instances of the loaded dll at run time.
thanks a lot.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement