In order to get past these errors I found that every place there is a #include "imapi2.h"
it needs to proceeded with a #include rpcsal.h
. As an alternative on my system adding the following to lines before each #include "imapi2.h"
also works.
#define __RC__range(min,max)
#define __RC__in_range(min,max)