fix resource.h for C++ usage