Questions like this one involve issues caused by not setting the proper subsystem version in the PE header. I can do that with /SUBSYSTEM
on Visual C++ and -Wl,--(major/minor)-subsystem-version
on gcc.
But I noticed there is also an OS version field in the PE header. This is set by -Wl,--(major/minor)-os-version
on gcc; I don't see an equivalent option in Microsoft's linker. What's confusing me is that gcc sets both the OS field and the subsystem field to 4.00 by default. So what's the difference between the two?
(Is the "image version" header field related to either of these?)
In addition, I see it is also possible to specify supported Windows versions in a manifest file. This question shows several being used at once.
What's the difference between all these settings and is there any advantage to using one over the other? Or all at the same time?
What if I have a DLL? Do any of these not apply with a DLL if the EXE that links to it isn't set up identically?
Thanks.