Suddenly can't compile (Error C4668)

As Maciek_Leto said - check for weird includes.
Based on that advice I TRIED to do a find '#include <' on my source files, but found nothing.
When I inspected them manually however, I found a dirty little
#include <shlobj_core.h> had somehow gotten into one of the headers (rider greys out includes that are not actually being used - which made it hard to see)

I deleted that, and everything compiles again.

(I have to say, this is not the first time Rider has caused problems like this for me - it loves to go pasting #includes that you dont actually want. wish it needed confirmation for this.)

2 Likes