Re: Dynamic (shared) libraries in r4gl ?
Posted in 1999
I wonder what poor Mr Obnoxio T Clown's parents were thinking when they gave him that name... :-) ' On Mon, 8 Feb 1999, Obnoxio The Clown wrote: > >Is it possible to make own shared libraries (in informix 4gl) ? > > > >I want use them in p-code (4gi) programs. > > Hm. Shared libraries are generally for use with executables, not p-code > programs, so in the strictest sense, I guess the answer is no. Agreed. > You might be able to extend the runner (fglgo) using shared libraries, You could. It is debatable whether there'd be much advantage, but it can be done by building the shared library (that's the tricky part), and then building the runner to use the shared library: cfglgo -o myrunner fgiusr.o -lmylib You'd probably need to add more information about where to find libmylib.so, possibly both for run-time and link-time. On Solaris, that would be -L and -R options; on most platforms, -L for link time library location. Note that I carefully didn't specify libmylib.so or /some/where/libmylib.so on the command line; that causes problems if you ever need to move the program to a machine where the library is in /some/other/place/libmylib.so, or if you need to move the library on the machine where the program is built and used. > but I guess we'd have to know what hardware/OS and versions you're using > this with to make a more informed comment. > > On the other hand, you can create .4go modules which you can treat as > libraries, and link them in at compile time. But they wouldn't behave > like shared libraries in the strict definition of the term. They would > be linked in and every user would have the full library loaded into > memory. So they wouldn't be dynamic. Correct. Also check out rdslib/rdslink in the IIUG software archives. > >Thanks and sorry for my poor english. > > I'm sure it's better than my Czech. Which keeps bouncing. :-) Yours, Jonathan Leffler (jleffler@informix.com) #include <wish/I/was/skiing.h> Guardian of DBD::Informix v0.60 (v0.61_02) -- http://www.perl.com/CPAN Informix IDN for D4GL & Linux -- http://www.informix.com/idn