Re: Compiling C and C++



Greg Warren wrote:
> 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


.



Relevant Pages

  • redefinable input() unput(): want old lex/flex de-POSIXed
    ... Where are the patches to Flex to enable redefining input() and ... Or is there some other LEX ... and will compile on NetBSD ... [I've just been reviewing the history of lex and flex for my upcoming flex&bison, ...
    (comp.compilers)
  • [HPADM] RE: mod_ssl question
    ... To recap, I was having a ... problem getting mod_ssl to compile in as it was looking for flex and HP only ... Several people mentioned downloading flex from the GNU ( ...
    (HP-UX-Admin)
  • Re: gcc-4.0: gcc4 fails to compile working FLex 2.5.31
    ... When I compile Flex 2.5.31 all is fine with version 3 of gcc. ... AC.x:131: unknown error processing section 1 ...
    (Ubuntu)
  • Re: [SLE] Install source
    ... In other linux we are able to compile lex.yy.c with command ... routine which calls the lexer. ... The problem may be related to differing flex versions on different ... i believe that a collect2 error is a link error, ...
    (SuSE)
  • Re: Lispers first look at Haskell
    ... it has constraints (aka Cells). ... Can compile to JS or DHTML. ... Or I might just do Flex, get something Interwebby on the resume while I am at it. ...
    (comp.lang.lisp)