[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] linux/unix shared libraries?
From: |
Mike Aubury |
Subject: |
Re: [Tinycc-devel] linux/unix shared libraries? |
Date: |
Mon, 21 Apr 2008 09:20:49 +0100 |
User-agent: |
KMail/1.9.9 |
I'm interested in this one too - including the ability to 'dlopen' the shared
library once created...
On Monday 21 April 2008 09:11:23 Olaf Dietrich wrote:
> Hi,
>
> 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
>
>
> This is:
>
> $ tcc -v
> tcc version 0.9.24
>
>
> Any suggestions or comments?
>
> Olaf
>
>
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/tinycc-devel
--
Mike Aubury
Aubit Computing Ltd is registered in England and Wales, Number: 3112827
Registered Address : Clayton House,59 Piccadilly,Manchester,M1 2AQ
- [Tinycc-devel] linux/unix shared libraries?, Olaf Dietrich, 2008/04/21
- Re: [Tinycc-devel] linux/unix shared libraries?,
Mike Aubury <=
- Re: [Tinycc-devel] linux/unix shared libraries?, David Given, 2008/04/21
- Re: [Tinycc-devel] linux/unix shared libraries?, grischka, 2008/04/21
- Re: [Tinycc-devel] linux/unix shared libraries?, Olaf Dietrich, 2008/04/22
- Re: [Tinycc-devel] linux/unix shared libraries?, grischka, 2008/04/22
- Re: [Tinycc-devel] linux/unix shared libraries?, Olaf Dietrich, 2008/04/23
- Re: [Tinycc-devel] linux/unix shared libraries?, grischka, 2008/04/24
- Re: [Tinycc-devel] linux/unix shared libraries?, grischka, 2008/04/25
- Re: [Tinycc-devel] linux/unix shared libraries?, Olaf Dietrich, 2008/04/28