Nominmax windows h


















Also note that windows. Best of both worlds, no? Ah, that's probably the issue then. It's not defined by default in any Boost header as far as I can tell. I had to define it manually to be able to build with clang on Windows. I have updated the original issue with the new info if you are interested :. Skip to content. Star New issue. Jump to bottom. Copy link. Lastique closed this Nov 29, Sign up for free to join this conversation on GitHub. Already have an account? Quote: Original post by Njguy I'm trying to use physx with directx, but i'm having a problem with windows.

Can you provide some details about how it messes up the rest of the project? I haven't had any problems with this approach. Quote: redefine those horrid min and max macros as template functions and you'll be golden. Actually, you shouldn't even have to do that. Quote: Original post by jyk Quote: redefine those horrid min and max macros as template functions and you'll be golden. I'm a little lost. Its just a header file so, not sure how that would work.

SiCrane Where you see min, replace with std::min. Where you see max, replace with std::max. CmpDev I personally think it is bad form to force a user on the windows platform to have to define NOMINMAX, it is quite possible to use std::min and std::max when the MS macros are defined; yet on the other hand I think it is bad form on MS' behalf to have used names which are used alot in their macros.

Quote: Original post by SiCrane Where you see min, replace with std::min. Ok I did this to my engine. I got rid of the errors. The engine compiles flawlessly. Really, we can't see your code unless you post it. This would reduce so much confusion. Future includes always thank you for it by not spamming warnings. Add a comment. Active Oldest Votes. If you're really desperate, put parentheses around the function names: std::min x, y ; This syntax won't apply a function-like macro.

Improve this answer. Pete Becker Pete Becker To NaturalDemon , here you have solution for your problem -- stackoverflow. David Gausmann David Gausmann 1, 13 13 silver badges 18 18 bronze badges. Or if you do not want to pollute the global namespace as much, using std::min; using std::max; may be a better solution. This may not always work with all libraries that use the macros. Thus the included libraries work and there's no global namespace pollution.

IInspectable Tom Tom 6, 1 1 gold badge 32 32 silver badges 57 57 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook.



0コメント

  • 1000 / 1000