You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 8, 2022. It is now read-only.
I'm following the "Calling Seq from C/C++" example using the latest seq-lang release (v0.11.0) and generate a shared object, but when linking to the executable I get the following errors:
$ seqc build -o foo.o foo.seq
$ gcc -shared -L/path/to/seq/lib -o libfoo.so foo.o -no-pie -lseqrt -lomp
$ gcc -o foo -lfoo foo.c
foo.c: In function ‘int main()’:
foo.c:7:27: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘int64_t {aka long int}’ [-Wformat=]
printf("%llu\n", foo(10));
~~~~~~~^
./libfoo.so: In function `_start':
(.text+0x0): multiple definition of `_start'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o:(.text+0x0): first defined here
./libfoo.so: In function `_fini':
(.fini+0x0): multiple definition of `_fini'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crti.o:(.fini+0x0): first defined here
./libfoo.so:(.rodata+0x0): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o:(.rodata.cst4+0x0): first defined here
./libfoo.so: In function `data_start':
(.data+0x0): multiple definition of `__data_start'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o:(.data+0x0): first defined here
./libfoo.so: In function `data_start':
(.data+0x8): multiple definition of `__dso_handle'
/usr/lib/gcc/x86_64-linux-gnu/7/crtbeginS.o:(.data.rel.local+0x0): first defined here
./libfoo.so: In function `_init':
(.init+0x0): multiple definition of `_init'
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crti.o:(.init+0x0): first defined here
/tmp/ccre1xzA.o: In function `main':
foo.c:(.text+0x0): multiple definition of `main'
./libfoo.so:/Users/seq-lang-test/foo.seq:(.text+0x1160): first defined here
/usr/lib/gcc/x86_64-linux-gnu/7/crtendS.o:(.tm_clone_table+0x0): multiple definition of `__TMC_END__'
./libfoo.so:(.data+0x10): first defined here
/usr/bin/ld: error in ./libfoo.so(.eh_frame); no .eh_frame_hdr table will be created.
/tmp/ccre1xzA.o: In function `main':
foo.c:(.text+0xa): undefined reference to `foo(long)'
collect2: error: ld returned 1 exit status
Hi,
I'm following the "Calling Seq from C/C++" example using the latest seq-lang release (v0.11.0) and generate a shared object, but when linking to the executable I get the following errors:
Calling ldd on the shared object file gives me
Would you be able to help with this if possible, please? I'm running this using Ubuntu 18.04 via WSL with gcc v 7.5.0 just for reference.