linux - Problem with using a generated file from flex -
I am trying to set up a project that uses Flex (fast Lex, not Adobe one). I am running on Ubuntu and I install Flex through the FT-gate system.
I have rotated the compound error and I have either found people who make their patch or have a lot of platforms where people ask and no answer.
This is my .ll file
% option c ++ %% %% This generates a lex. Yy.cc file that I include in my main file.
#include "lex.yy.cc" int main () {return 0; } The error I get is like many "many definitions".
lex.yy.cc | 511 | `YyFlexLexer :: yylex () '|
I have a Flex version of 2.5.35 and I am using the GCC compiler through Code :: Blocks Editor.
If I compile the main file directly through the terminal I get this.
`undefined reference =" text for itemprop
The problem was found! You should not include the generated file, but it must be compiled and included as an object file.
Flex file. G ++ -c lex.yy.cc g ++ -o key main.cpp lex.yy .o
Comments
Post a Comment