Post the full error text. The actual error probably occurs elsewhere, when the macro is expanded. (You're not trying to compile the .rc file as a .cpp file, are you?)
@Dutch
I actually tried to compile the .rc as a .cpp file.
There is kind of a solution on https://www.eclipse.org/forums/index.php/t/80633/
But adding the path to the Tool Settings | MinGW C++ Linker | Miscellaneous | Other Objects is giving me an error. Without this path my project is compiling, but the code from the resource.rc is not working runtime. How to proceed now?
.rc files are compiled by a "resource compiler" program, not the C++ compiler. The standard resource compiler supplied by MS is called RC. I think that MinGW (which I think you are using) has a program called windres.
In Eclipse, there should be a "pre-build" step where you can add the call to windres. Also you need to add the "object" file that's created by windres to the linker, which I guess is what that "other objects" stuff is about.
The windres call will be something like this: windres -i..\resources.rc -o..\resources.o
I don't know what relative path to use ( ..\ is just an example).