Re: Possible OS incompatibility with __attribute__ 'shared'
Stefan Ring via Gcc-help <[email protected]> Mon, 22 Dec 2025 09:21:14 +0100
| Newsgroups | gmane.comp.gcc.help |
|---|---|
| Message-ID | <CAAxjCEwXmnwiL9Se7yqodaJ4Ct3gGXvssM4H7urp8qs0W+Skkg@mail.gmail.com> |
> Thanks, but that does not answer the question. The compiled code runs on BOTH systems. The only difference is that the method described does not work on Windows 7, whether the resulting executables are recompiled there or not. If it had never worked at all, I'd consider the choice of compiler version as relevant. My suspicion is that it is by design -- Windows NT’s design without any MinGW involvement at all. It would be more interesting to see if it worked on Windows XP or earlier. > The question is not about the versions of GCC. It's about the compatibility for the method as described, given that it works in one Windows OS but not the other. If this puts it beyond the scope of advice on GCC, how about some other simple way to share a single variable between processes using a hook DLL. I mention that because I'm trying to avopid making this an 'XY' problem (a phrase I see a lot on StackOverflow...) How is this kind of variable sharing done in Visual C++?