% gerbil version
Gerbil v0.18 on Gambit v4.9.5-40-g24201248
We try to compile hello.ss into hello:
% cat hello.ss
(export main)
(def (main . args)
(displayln "hello, world"))
% gxc -exe -o hello hello.ss
/tmp/gxc.1700324049.6964028/hello.scm:
/tmp/empty/hello.scmx:
/tmp/gxc.1700324049.6964028/hello.c:
/tmp/empty/hello.c:
/tmp/empty/hello_.c:
/usr/bin/ld: /tmp/empty/hello.o: in function `___LNK_hello':
hello.c:(.text+0x3d2): multiple definition of `___LNK_hello'; /tmp/gxc.1700324049.6964028/hello.o:hello.c:(.text+0x1da): first defined here
collect2: error: ld returned 1 exit status
*** ERROR IN gxc#compile-executable-module/separate --
*** ERROR IN ?
--- Syntax Error at compile: Compilation error; process exit with nonzero status
... form: "gcc"
However, naming the output binary differently makes it work:
We try to compile
hello.ss
intohello
:However, naming the output binary differently makes it work:
(Personally, I think the name of the output file should not change the binary content at all.)