Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VC2012 compiler issues with min/max #557

Closed
siddharthuniv opened this issue Oct 2, 2016 · 2 comments
Closed

VC2012 compiler issues with min/max #557

siddharthuniv opened this issue Oct 2, 2016 · 2 comments

Comments

@siddharthuniv
Copy link

Hi,

I use windows 7 x64, visual studio 2012.

I have a large project and wanted to use glm for our project. However, glm.hpp includes header file: #include "detail/_fixes.hpp" which undefs min and max macro. If my project using glm is included, then other projects that use the macro that comes with the windows SDK is broken. For now, i tried commenting out including _fixes.hpp and renamed the min function usage inside of glm. And everything seems to compile fine. Could you suggest if theres something that can be done on your side, or anything that can be done on my side so that i dont need to edit glm headers?

Thank you,

Sid

@Groovounet
Copy link
Member

Hi,

Maybe a fix for you would be to use #define NOMINMAX in your code?
http://stackoverflow.com/questions/4913922/possible-problems-with-nominmax-on-visual-c

Thanks,
Christophe

@Groovounet Groovounet changed the title compiler issues with min/max VC2012 compiler issues with min/max Oct 16, 2016
@Groovounet Groovounet added this to the GLM 0.9.9 milestone Nov 20, 2016
@Groovounet Groovounet self-assigned this Nov 20, 2016
@Groovounet
Copy link
Member

GLM 0.9.9 manual has a FAQ answering this question following by previous answer.

Thanks,
Christophe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants