-
Notifications
You must be signed in to change notification settings - Fork 2
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
Compiler error with MSVC due to max()
and min()
#7
Comments
Hi @srupprecht-tt , Could you please indicate me the lines which you had to change? I am aware of this solution to the problem: https://stackoverflow.com/a/22023122/1600678, and actually believed that I always implemented accordingly. Obviously I was wrong. Could you also try to apply the fix at one of the lines to see if it works on your side? |
@srupprecht-tt just a kind reminder: any update on the issue? |
Hi @mristin
|
Thanks, @srupprecht-tt ! I plan to have a look at this tomorrow and let you know what I find out. |
max()
and min()
max()
and min()
max()
and min()
max()
and min()
@srupprecht-tt I had a cursory look at it. Unfortunately, my MSVC does not complain, so we will have to use your machine for debugging :-(. Could you please try to add I found this StackOverflow question and answers useful: https://stackoverflow.com/questions/4913922/possible-problems-with-nominmax-on-visual-c/4914108#4914108 What really confuses me is that There also seems to be a flag for MSVC: https://stackoverflow.com/a/13416506/1600678, namely It seems to me that your MSVC defines the |
I don't know exactly why the one works but the other doesn't and how to include this "bug fix" into your development, but that's good news at least. |
Thanks for the information, @srupprecht-tt !
|
I'll check for For more info on |
Hey there,
I built the repository using the Release 0.0.1-alpha.1 using Visual Studio 17 2022 (Debug x64).
When trying to include the built "aas_core3.dll" into my project, I got some errors within the "types.hpp" header file.
After some tries, I realized that my Visual Studio is confused by the naming since there are standard functions named "min" or "max". I solved this by refactoring all "min"/"max"-functions in the "types.hpp" file to "const_min"/"const_max".
For some reason the alternative, putting "#define NOMINMAX" before including the header, didn't work, maybe I did it wrong.
Best regards
The text was updated successfully, but these errors were encountered: