Compiling C and C++

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am working on a language project and am using flex to generate a scanner .
The output of flex is a C file, lex.yy.c I want to use classes (C++) for
all other phases of the project. When I compile the lex.yy.c I get an
error: - C1010 unexpected end of file while looking for precompiled header
directive. When I include stdafx.h I get an error: C1853 Debug/flextest.pch
is not a precompiled header file created with this compiler. What am I doing
wrong?
 
Greg said:
I am working on a language project and am using flex to generate a
scanner . The output of flex is a C file, lex.yy.c I want to use
classes (C++) for all other phases of the project. When I compile
the lex.yy.c I get an error: - C1010 unexpected end of file while
looking for precompiled header directive. When I include stdafx.h I
get an error: C1853 Debug/flextest.pch is not a precompiled header
file created with this compiler. What am I doing wrong?

You need to make your stdafx.h compatible with a C compiland, OR disable
precompiled headers for that file, the latter being the more practical
solution, I'd expect.

-cd
 
Back
Top