__go_go not defined
Closed this issue · 0 comments
I tried to link my first golib program and it needless to say crashed with this.
[ablive@dimension test]$ nim c t.nim Hint: used config file '/etc/nim.cfg' [Conf] Hint: system [Processing] Hint: t [Processing] Hint: golib [Processing] Hint: macros [Processing] Hint: strutils [Processing] Hint: parseutils [Processing] Hint: math [Processing] Hint: algorithm [Processing] Hint: typetraits [Processing] CC: t CC: stdlib_system CC: golib_golib CC: stdlib_macros CC: stdlib_strutils CC: stdlib_math CC: stdlib_algorithm Hint: [Link] sh: Symbol `rl_readline_state' has different size in shared object, consider re-linking /home/ablive/test/nimcache/t.o: In function `tInit000': t.c:(.text+0x54e): undefined reference to `__go_go' collect2: error: ld returned 1 exit status Error: execution of an external program failed: 'gcc -o /home/ablive/test/t /home/ablive/test/nimcache/stdlib_typetraits.o /home/ablive/test/nimcache/stdlib_algorithm.o /home/ablive/test/nimcache/stdlib_math.o /home/ablive/test/nimcache/stdlib_parseutils.o /home/ablive/test/nimcache/stdlib_strutils.o /home/ablive/test/nimcache/stdlib_macros.o /home/ablive/test/nimcache/golib_golib.o /home/ablive/test/nimcache/stdlib_system.o /home/ablive/test/nimcache/t.o -lm -ldl'
The code was:
``
import golib
proc q(f: string) {.goroutine.} =
echo f
go q("Test")
``
I have gogcc, golib, and nim-golib