Works for me. (on ubuntu 6.02)
--- grischka
From: "Olaf Dietrich":
> The simple question is: Is it or has it ever been possible to
> compile shared libraries with tcc under linux/unix?
>
> Here is a very simple test case:
>
>
> $ cat mylib.c
>
> int func(void)
> {
> return 12345;
> }
>
>
> $ cat testlib.c
>
> #include <stdio.h>
>
> extern int func(void);
>
> int main(void) {
> printf("%d\n", func());
> return 0;
> }
>
>
> Using gcc, I can simply compile these files and
> obtain a working shared library:
>
> $ export LD_LIBRARY_PATH=`pwd`
> $ gcc -fPIC -shared mylib.c -o libmylib.so
> $ gcc testlib.c -L. -lmylib -o testlib
> $ ./testlib
> 12345
>
> How can I do the same thing with tcc? I tried:
>
> $ export LD_LIBRARY_PATH=`pwd`
> $ tcc -r -shared mylib.c -o libmylib.so
> $ tcc testlib.c -L. -lmylib -o testlib
> $ ./testlib
> Segmentation fault
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel