[lazarus] FPC - Help Needed -Dynamic Linking

Shane Miller SMiller1 at stvgb.org
Fri Apr 6 14:06:57 EDT 2001


Greetings,

In order to create Packages for Lazarus I am dynamically linking a unit into Lazarus.  I am using the dl functions DLOpen, DLClose, DLSym to facilitate this.

I open the library, then call dlsym to get the pointer to the procedure I want to call.  That works fine.  Then I call the procedure.  Inside the library unit's exported function I call a function (register) in another unit that's in the uses clause.  In the Register function of that unit I call RegisterComponents.  This calls the function within creginst.inc unit.  Because this is the first registration and the ComponentPages is not assigned it calls InitComponentPages.  Somewhere within the TCollection.Create the funciton throws an exception.

Can someone look into that code and tell me if it's related to the dynamic linking or if it's simply an error in the InitComponentPages code?

I really have been struggling trying to trace this down and would appreciate any help.

Thanks
Shane







More information about the Lazarus mailing list