Closed danomatika closed 11 years ago
Ok, turns out this was due to a (new) missing define for libpd. The question still stands though ... should we be forcing an older version of windows by default?
I don't know if that should be kept at all, but the actual value 0x400 (which relates to Windows versions previous to Windows 2000), prevents from defining useful constants when compiling with Visual Studio (_WIN32_WINNT is used to define WINVER in sdkddkver.h). This the case for EnumDisplayDevices which is used in ofxFenster for instance. Because of that, ofxFenster doesn't compile without changing _WIN32_WINNT to at least 0x500 (relating to Windows 2000) in ofConstant.h
Using 0x400 seems really limitative, I think this value should be updated to higher one.
Well, do,we even need it to be defined?
I don't have a complete view of the problem. From what I've seen in several articles on the net, windows versions setting in Visual was a mess, so that MS provided a sdkddkver.h file to take care of all that simply by setting _WIN32_WINNT or _WIN32_NTDDI.
I did not investigate much further. It seems reasonable doing like this and I think it should be kept, but with a later Windows version (as proposed in my first post).
_WIN32_WINNT
gets defined 10 times at different places in the OF codebase, twice (in libs/glu) even without an #ifndef
(curiously, those are in iOS and android header files o_O), so I'm not sure it even makes a difference how we set it. All values, with the exception of in Poco, are 0x400.
Ha, that's a nice reality check.
I did find a difference using VS10 and setting it in ofConstant.h : moving from 0x400 to 0x500 changes WINVER and makes basic callback functions, such as those used to manage several displays (which is used in ofxFenster), available.
@bilderbuchi Fixed.
Thanks, closing.
I notice that in ofConstants.h, _WIN32_WINNT is defined even though the reason (old ofThread code) is long gone.
This is causing an issue with ofxPd, since libpd defines it as well. There might be issues with other libraries as well.