Public bug reported: using yacc i create y.tab.c,lex.yy.c,y.tab.h files..den when i compile y.tab.c it compiles well..but gives a problem while compiling lex.yy.c i.e [EMAIL PROTECTED]:~/Documents$ cc lex.yy.c /usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crt1.o: In function `_start': (.text+0x18): undefined reference to `main' collect2: ld returned 1 exit status
and when i try this command it prompts something very vague..can u please explain [EMAIL PROTECTED]:~/Documents$ cc y.tab.c lex.yy.c y.tab.h /tmp/ccmSxrDQ.o:(.bss+0x0): multiple definition of `yyin' /tmp/ccYrkNRx.o:(.bss+0x0): first defined here /tmp/ccmSxrDQ.o:(.bss+0x4): multiple definition of `yyout' /tmp/ccYrkNRx.o:(.bss+0x4): first defined here /tmp/ccmSxrDQ.o:(.data+0x0): multiple definition of `yylineno' /tmp/ccYrkNRx.o:(.data+0x0): first defined here /tmp/ccmSxrDQ.o:(.bss+0x8): multiple definition of `yy_flex_debug' /tmp/ccYrkNRx.o:(.bss+0x8): first defined here /tmp/ccmSxrDQ.o: In function `yylex': lex.yy.c:(.text+0x0): multiple definition of `yylex' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x0): first defined here /tmp/ccmSxrDQ.o: In function `yy_create_buffer': lex.yy.c:(.text+0x10a5): multiple definition of `yy_create_buffer' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x10a5): first defined here /tmp/ccmSxrDQ.o: In function `yywrap': lex.yy.c:(.text+0x18fa): multiple definition of `yywrap' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x18fa): first defined here /tmp/ccmSxrDQ.o: In function `yyrestart': lex.yy.c:(.text+0xecb): multiple definition of `yyrestart' /tmp/ccYrkNRx.o:y.tab.c:(.text+0xecb): first defined here /tmp/ccmSxrDQ.o: In function `yyrealloc': lex.yy.c:(.text+0x18cd): multiple definition of `yyrealloc' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x18cd): first defined here /tmp/ccmSxrDQ.o: In function `yy_switch_to_buffer': lex.yy.c:(.text+0xf67): multiple definition of `yy_switch_to_buffer' /tmp/ccYrkNRx.o:y.tab.c:(.text+0xf67): first defined here /tmp/ccmSxrDQ.o: In function `yyalloc': lex.yy.c:(.text+0x18ba): multiple definition of `yyalloc' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x18ba): first defined here /tmp/ccmSxrDQ.o: In function `yy_delete_buffer': lex.yy.c:(.text+0x1125): multiple definition of `yy_delete_buffer' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x1125): first defined here /tmp/ccmSxrDQ.o: In function `yyfree': lex.yy.c:(.text+0x18e7): multiple definition of `yyfree' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x18e7): first defined here /tmp/ccmSxrDQ.o: In function `yy_flush_buffer': lex.yy.c:(.text+0x1255): multiple definition of `yy_flush_buffer' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x1255): first defined here /tmp/ccmSxrDQ.o: In function `yypush_buffer_state': lex.yy.c:(.text+0x12d8): multiple definition of `yypush_buffer_state' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x12d8): first defined here /tmp/ccmSxrDQ.o: In function `yypop_buffer_state': lex.yy.c:(.text+0x13aa): multiple definition of `yypop_buffer_state' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x13aa): first defined here /tmp/ccmSxrDQ.o: In function `yy_scan_buffer': lex.yy.c:(.text+0x157a): multiple definition of `yy_scan_buffer' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x157a): first defined here /tmp/ccmSxrDQ.o: In function `yy_scan_string': lex.yy.c:(.text+0x1659): multiple definition of `yy_scan_string' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x1659): first defined here /tmp/ccmSxrDQ.o: In function `yy_scan_bytes': lex.yy.c:(.text+0x167b): multiple definition of `yy_scan_bytes' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x167b): first defined here /tmp/ccmSxrDQ.o: In function `yyget_lineno': lex.yy.c:(.text+0x1753): multiple definition of `yyget_lineno' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x1753): first defined here /tmp/ccmSxrDQ.o: In function `yyget_in': lex.yy.c:(.text+0x175d): multiple definition of `yyget_in' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x175d): first defined here /tmp/ccmSxrDQ.o: In function `yyget_out': lex.yy.c:(.text+0x1767): multiple definition of `yyget_out' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x1767): first defined here /tmp/ccmSxrDQ.o: In function `yyget_leng': lex.yy.c:(.text+0x1771): multiple definition of `yyget_leng' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x1771): first defined here /tmp/ccmSxrDQ.o: In function `yyget_text': lex.yy.c:(.text+0x177b): multiple definition of `yyget_text' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x177b): first defined here /tmp/ccmSxrDQ.o: In function `yyset_lineno': lex.yy.c:(.text+0x1785): multiple definition of `yyset_lineno' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x1785): first defined here /tmp/ccmSxrDQ.o: In function `yyset_in': lex.yy.c:(.text+0x1792): multiple definition of `yyset_in' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x1792): first defined here /tmp/ccmSxrDQ.o: In function `yyset_out': lex.yy.c:(.text+0x179f): multiple definition of `yyset_out' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x179f): first defined here /tmp/ccmSxrDQ.o: In function `yyget_debug': lex.yy.c:(.text+0x17ac): multiple definition of `yyget_debug' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x17ac): first defined here /tmp/ccmSxrDQ.o: In function `yyset_debug': lex.yy.c:(.text+0x17b6): multiple definition of `yyset_debug' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x17b6): first defined here /tmp/ccmSxrDQ.o: In function `yylex_destroy': lex.yy.c:(.text+0x181d): multiple definition of `yylex_destroy' /tmp/ccYrkNRx.o:y.tab.c:(.text+0x181d): first defined here collect2: ld returned 1 exit status i would be thankful if you solved my problem.. ** Affects: ubuntu Importance: Undecided Status: New -- executing compiler C program using yacc and lex tool https://bugs.launchpad.net/bugs/271359 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs