Undefined Reference To yywrap

后端 未结 5 1466
后悔当初
后悔当初 2020-12-07 22:10

I have a simple \"language\" that I\'m using Flex(Lexical Analyzer), it\'s like this:

/* Just like UNIX wc */
%{
int chars = 0;
int words = 0;
int lines = 0;         


        
5条回答
  •  萌比男神i
    2020-12-07 22:31

    flex doesn't always install with its development libraries (which is odd, as it is a development tool). Install the libraries, and life is better.

    On Redhat base systems:

    yum -y install flex-devel
    ./configure && make
    

    On Debian based systems

    sudo apt-get install libfl-dev
    

提交回复
热议问题