Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2002-09

Loading/Unloading pascal libs at runtime

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner

Hi,

I want to load/unload object pascal libs into object pascal tried the following:
- created a base lib with the registration system (with ppumove)
- created a program, that uses the base lib (compiled with -XD)
- created an extra lib, that uses the base lib (also ppumove)

Everything compiled+linked without any error.
Now I load in the program at runtime the extra lib via 'dlopen'. That works, if the extra lib does not use anything from the fpc packages like RTL, FCL, ... . If I use something from the fpc packages, I get a linker error. For example:

dlerror:/pascal/ext1_lib/lib/libext1.so: undefined symbol: FPC_ANSISTR_ASSIGN

What am I doing wrong?
Or: Can someone point me to another solution to load/unload code at runtime?

thx in advance,
Mattias Gaertner

Reply by email