I'm trying to rebuild someone's old C++ project using Dev-C++ (version 4.9.9.2) and the standard compiler that it comes with (I think g++ using MinGW) under Windows XP Pro SP3 32-bit. In one of the files strsafe.h is included and when I try to compile, I get this error:
expected primary-expression before ',' token
The lines of code that the error points to are in strsafe.h (a Microsoft(?) library header file) all look something like this:
hr = StringGetsExWorkerA(pszDest, cchDest, cbDest, NULL, NULL, 0);
There are 2 "expected primary-expression" errors for each of these lines. I found this forum thread which suggests that the NULL value is not properly recognized and suggests that I include <cstddef>
before strsafe.h. I did that and it doesn't work. Also, it appears that NULL is in fact defined, because when I do '#define NULL 0' before including strsafe.h I get an error telling me that I'm redefining it there.
I'm sorry I can't provide any more details, but the code to reproduce this error is simply '#include <strsafe.h>
', so I don't really know what else to say. Does anyone have any idea what might be going on and how I can fix this?
Thanks!
(I already tried downloading the latest version of the Microsoft Platform SDK so I have an up-to-date version of strsafe.h)