Quote:
Originally Posted by LoRd_MuldeR
(or set it via -D_WIN32_WINNT command-line option)
|
Which I assume is a
cmake option?
Quote:
Originally Posted by LoRd_MuldeR
It does not "magically" change the application code! So, if the code that your are compiling depends on a certain Win32 API function, but that function is disabled via _WIN32_WINNT, then the compilation is going to fail
|
Then I might as well stick to MingGW-w64 8.0.2 from now on to save myself lots of trouble.
Quote:
Originally Posted by LoRd_MuldeR
Also note that _WIN32_WINNT does not effect the pre-compiled libraries (.a files), which you are linking, in at all! That's because _WIN32_WINNT has to be used at compile-time, not at link time!
|
I don't use pre-compiled libraries. I compile everything myself, because not only do the binaries that I compile need to be WinXP compatible, they need to work on old non-SSE2 cpus as well.
Quote:
Originally Posted by LoRd_MuldeR
If you want to change the target Windows version of a library (.a file), then you have to re-compile that library from the sources and correctly set _WIN32_WINNT while doing so.
|
Yes, I understand I have to re-compile all dependency libraries in that case.
Quote:
Originally Posted by LoRd_MuldeR
For the same reason, setting _WIN32_WINNT has no effect on MinGW-w64 itself or any of the pre-compiled libraries that ship with MinGW-w64. It may have an impact, if you build MinGW-w64 yourself, from the sources.
|
Which I do, as I'm using Zeranoe's "MingGW-w64 Build Script" after all.
Quote:
Originally Posted by LoRd_MuldeR
But: That does not apply to libwinpthread, i.e. the implementation of the pthread-API that comes with MinGW-w64.
|
The reason why I'm compiling MinGW-w64 with
pthreads-w32 (which is the default thread library in Zeranoe's "MingGW-w64 Build Script" anyway).
Thanks for your elaborate post, LoRd_MuldeR.