totalspectrum / flexprop

Simple GUI for Propeller development (both P1 and P2)
Other
38 stars 15 forks source link

Multiple definition error compiling under Ubuntu 20.10 #38

Closed maccasoft closed 3 years ago

maccasoft commented 3 years ago

Compilation under Ubuntu 20.10 fails with the following errors:

/usr/bin/ld: build/common.o:/home/marco/git/flexprop/spin2cpp/frontends/common.c:40: multiple definition of allparse'; /tmp/ccauqf0s.o:/home/marco/git/flexprop/spin2cpp/spin2cpp.c:38: first defined here /usr/bin/ld: build/common.o:/home/marco/git/flexprop/spin2cpp/frontends/common.c:88: multiple definition ofgl_progname'; /tmp/ccKTEd6u.o:/home/marco/git/flexprop/spin2cpp/cmdline.c:39: first defined here

The attached simple patch defines the duplicated variables as extern and seems to fix the problem, but maybe a better definition fix should be more appropriate.

compile.patch.txt

totalspectrum commented 3 years ago

Thanks for the bug report (and the patch!). I've checked the fixes in to github.