Usbac / quich

Just an advanced terminal calculator.
MIT License
70 stars 12 forks source link

Cannot compile. #4

Closed odinis closed 4 years ago

odinis commented 4 years ago

Hello.

Following instructions here, below getting errors I cannot resolve. Any advice? Thank you in advance.

/usr/bin/ld: /usr/bin/ld: /tmp/cc6hOmiE.o:(.bss+0x0): multiple definition of current_token'; /tmp/cc6hOmiE.o:(.bss+0x0): multiple definition ofcurrent_token'; /tmp/cc8avGdG.o:(.bss+0x/tmp/cc8avGdG.o:(.bss+0x0): first defined here /usr/bin/ld: 0): first defined here /usr/bin/ld: /tmp/cc6hOmiE.o:(.bss+0x8)/tmp/cc6hOmiE.o:(.bss+0x8): multiple definition of current_type'; /tmp/cc8avGdG.o:: multiple definition ofcurrent_type'; /tmp/cc8avGdG.o:(.bss+0x8): first defined here (.bss+0x8): first defined here /usr/bin/ld: /tmp/cc6hOmiE.o:(.bss/usr/bin/ld: /tmp/cc6hOmiE.o:(.bss+0x10): multiple definition of operands_first'+0x10): multiple definition ofoperands_first'; /tmp/cc8avGdG.o:(.bss+0x10; /tmp/cc8avGdG.o:(.bss+0x10): first defined here /usr/bin/ld: /tmp/cc6hOmiE.o): first defined here /usr/bin/ld: /tmp/cc6hOmiE.o:(.bss+0x18): multiple definition of :(.bss+0x18): multiple definition ofoperands_head'; /tmp/cc8avGdG.o:(operands_head'; /tmp/cc8avGdG.o:(.bss+0x18): first defined here /usr/bin/ld.bss+0x18): first defined here /usr/bin/ld: /tmp/cc6hOmiE.o:(.bss+0x: /tmp/cc6hOmiE.o:(.bss+0x20): multiple definition of operators_first'; 20): multiple definition ofoperators_first'; /tmp/cc8avGdG.o:(.bss+0x20)/tmp/cc8avGdG.o:(.bss+0x20): first defined here /usr/bin/ld: /tmp/cc6hOmiE.o:: first defined here /usr/bin/ld: /tmp/cc6hOmiE.o:(.bss+0x28): multiple definition of operators_head(.bss+0x28): multiple definition ofoperators_head'; /tmp/cc8avGdG.o:(.bss'; /tmp/cc8avGdG.o:(.bss+0x28): first defined here /usr/bin/ld+0x28): first defined here /usr/bin/ld: /tmp/cc6hOmiE.o:(.bss+0x30: /tmp/cc6hOmiE.o:(.bss+0x30): multiple definition of result_head'; /tmp/cc8avGdG.o): multiple definition ofresult_head'; /tmp/cc8avGdG.o:(.bss+0x30): first defined here:(.bss+0x30): first defined here /usr/bin/ld: /usr/bin/ld: /tmp/ccABD7VD.o:/tmp/ccABD7VD.o:(.bss+0x0): multiple definition of (.bss+0x0): multiple definition ofcurrent_token'; /tmp/cc8avGdG.o:(current_token'; /tmp/cc8avGdG.o:(.bss+0x0): first defined here .bss+0x0): first defined here /usr/bin/ld: /tmp/ccABD7VD.o:(.bss+0x/usr/bin/ld: /tmp/ccABD7VD.o:(.bss+0x8): multiple definition of current_type'; 8): multiple definition ofcurrent_type'; /tmp/cc8avGdG.o:(.bss+0x8)/tmp/cc8avGdG.o:(.bss+0x8): first defined here : first defined here collect2: error: ld returned 1 exit status collect2: error: ld returned 1 exit status make: *** [Makefile:11: quich] Error 1```

Usbac commented 4 years ago

Hello @odinis! Thank you so much for pointing out that error. :) It should have been fixed now with the current commit dfb87c068ffac648bc7fda1962e6ad63f8e6a890.

The problem was that the extern keyword was missing from the variables definition in the headers file.

Let me know if it has been fixed for you, to close the Issue. Regards.

odinis commented 4 years ago

Thanks. Works now, issue resolved.