c-compiler icon indicating copy to clipboard operation
c-compiler copied to clipboard

compiling error

Open bmudit opened this issue 1 year ago • 0 comments

While compiling the y.tab.c file, the following error pop up:

/usr/bin/ld: /tmp/ccSDCAsB.o: in function main': y.tab.c:(.text+0x5605): multiple definition of main'; /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libl.a(libmain.o):(.text.startup+0x0): first defined here collect2: error: ld returned 1 exit status

Mostly, the bison output file is creating multiple definitions of the the main function

bmudit avatar Apr 13 '23 18:04 bmudit