Hi,
I was trying to use Advisor on one application which was using std::max function.
After including annotate.h in the target file compiler gave error on the std::max function. Without this header file it compiles fine.
Following is a test case:
#include <iostream>
#include <annotate.h> //after commenting this it compiles fine
int main()
{ int a=15;
int b=18;
int c=std::max(a,b);
}
Are you aware of this issue? how should i fix this?
Hi!
Yes, we know - this is an unfortunate side effect of our combining what would typically be found in a pair of files (annotate.h and annotate.cpp), into the single file: annotate.h. THEN having annotate.h include windows.h.
Generally, you can work around these compilation errors caused by annotate.h including windows.h by inserting
#define WIN32_LEAN_AND_MEAN
before the
#include "annotate.h"
In your case, you are may also need to specify
#define NOMINMAX
Very annoying. We are looking at alternatives – suggestions are welcome!
Regards,
-Caroline