How to re-solve 'multiple main definitions' error ?

From: vsk (vsk_cit_at_yahoo.co.in)
Date: 02/28/05


Date: 27 Feb 2005 23:19:11 -0800

Hai all,
I have written a parser in lex. I hope most of you know that lex, a
command line utility available in linux
will take .lex file as input and it will produce .c file as output. Now
i need to make this file as a library such that
it could be used in another c-file. Thing here is, .c file produced by
lex will have a 'main' function.I renamed the main function into an
other name say 'parse' and i converted this into a library. When i
tried to use this in another c-file, it gives me the erroe as multiple
mail definitions.
Can anyne help me in this regard ?.
Thanks in advance,



Relevant Pages

  • Re: How to re-solve multiple main definitions error ?
    ... > I have written a parser in lex. ... > command line utility available in linux ... > it could be used in another c-file. ... > tried to use this in another c-file, it gives me the erroe as multiple ...
    (comp.lang.c)
  • Re: add line numbers in bash redirection
    ... > of a command (for both stdout and stderr) and redirect stdout and stderr ... > bash-2.05b# ls lex fex ... > redirection takes place before the 'nl' command. ...
    (comp.unix.shell)
  • how execute find with this error
    ... i have ths messages in find command ... ksh: /usr/bin/find: arg list too long ... somebody know how run this command with out error ...
    (Tru64-UNIX-Managers)
  • Wanting to get started with lex
    ... I am just starting with lex. ... because it can't find yywrap. ... What command will do I use to to compile and link lex.yy.c? ... Thx ...
    (comp.os.linux.development.apps)
  • Re: flex input buffer size and REJECT
    ... Ron Hardin wrote: ... Lex is for anyone, not "linux". ... Fix your spec. ...
    (comp.os.linux.misc)