help translating pascal's libc "dlopen , dlsym and dlclose" into c source ...
i have encountered problems when translating a pascal procedure (which uses libc functions :: dlopen , dlsym and dlclose) into c source ... hint and direct me to the solution(preferably with smaller simpler c code examples) ...
below is the pascal code , i try to implement it in a self-contained pascal procedure with only one "includes"("uses" in pascal) libc at somewhere else ... it might not be the "correct" way of coding it but i managed to just compile and run the whole app , just run ... Code:
procedure TForm1.Button3Click(Sender: TObject); //thanks in advance ... . |
Hi -
I noticed this has been here for awhile... I'm really not sure what your question is: 1. You're porting an application from Kylix/Pascal (essentially, a Linux version of Borland Pascal) into C. Is this correct? 2. You've encountered places in the Pascal code where it calls dlopen, etc. These Pascal codes (as it looks like you already know) are simple wrappers around the standard libc calls. In other words, "dlopen()" and friends are *already* in C. 3. If you want to use dlopen() etc from your C program, you can simply call them. Most programs don't even need explicitly do a "dlopen(): everything's automagically taken care of when the C/C++ program is linked, and the "shared libraries" are com- pletely transparent to the developer). 4. Finally, if you're interested in how dlopen() etc are linked: just look in the kernel source (the C library function is, like your Kylix counterpart, just a thin wrapper). 'Hope that helps .. PSM |
All times are GMT -5. The time now is 03:28 PM. |