Quantcast
Viewing all articles
Browse latest Browse all 22162

gch file generates stray character errors

I'm compiling a small library with the command

g++ cppbase.cpp -c -w

and I'm using pre-compiled header cppbase.h.gch. cppbase.cpp looks like this:

#include "../inc/cppbase.h.gch"namespace cppbase {  /*...*/}

But when I compile, it goes on for a good half an hour filling up the console with

..\inc\cppbase.h.gch:<line>:<character>: error: stray '/xxx' in program

I suspect it's trying to read the gch as a normal h file, but I'm not sure about that. I'm using MinGW for 32-bit windows.


Viewing all articles
Browse latest Browse all 22162

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>