Show quoted text 13 lines
> Reply-To:
> Date: Sun, 3 Jun 2001 15:12:42 +0200 (CEST)
> From: Peter Vreman
> X-Sender:
> To:
> Subject: Library linking with C working !
>
>
> It was more easy than i first thought. No need for .ctor and .dtor
> stuff. Just pass "-init <Symbolname>" to the linker and the symbol to
> run at load of the library is set. The same for -fini.
>
> The 1.0.5 compiler works correctly.
Congratulation!
We speak about last variant of 1.0.5 -- that is right? FPC 1.0.5 from 14 march 2001 do not works correctly.
Show quoted text 9 lines
> The 1.1 compiler crashes at exit
> when the pas1 function is called from p.c. If the function call is
> left away then the progrma shuts down correctly.
>
> 1. Compile p1.pp normally
> 2. Move libp1.so to /usr/lib or any other path searched by ldconfig
> 3. Run ldconfig
> 4. Compile p.c with: 'gcc -o p p.c -lp1'
> 5. Run the program.
This can be done simpler (comands are for DCC from Kylix):
1) dcc p1.pp
2) gcc -o p p.c libp1.so
3) LD_LIBRARY_PATH=`pwd` p
Regards,
Sergey Korshunoff
