Re: Q: 4GL modules as libraries
Posted in 1995
In Article <3h2t6t$hd@news.cs.tu-berlin.de> Olaf Brandes writes: >Hi there, > >I tried to write a number of I4GL modules and put them together in a >library. (The functions serve as a more convenient interface to C functions >that I have written). > >It seems that 4GL's make-like facility (apart from being not too smart about >modification times of libraries) cannot handle this. When linking, I get the >message "undefined symbol: _length". > >The reason for that is that I use the LENGTH() function from within my >library, I guess. And at the time 4GL links the user-specified libs, the >I4GL lib has already been used, so 4GL specific symbols may not occur inside >user provided libs. > >Am I right? Any workarounds (apart from not putting the functions into a >library)? > It's a while since I used the Informix supplied development environment, but I believe you can specify the order in which libraries are linked. Trouble is, I suspect, that it either links user supplied libraries before the Informix ones, or, afterwards, and that your linker likes to find things in a certain order. I'd use the standard Unix make and ar tools to make my libraries and control linking. This way, if your linker really does care about library and/or object order, you can not only control the exact order, but use hideous kluges like :- ar crv library.a `lorder *.o | tsort` which I once had to use on a very old Uniplus+ SVR2 platform. Certainly, there is no reason why you shouldn't be able to use length() and other Informix supplied functions in your library modules. Regards Neil Neil S. Briscoe | The Three Stages of Life: Aldershot, Hants, England | First, you believe in Father Christmas neil@salmon.demon.co.uk | Then you don't believe in Father Christmas nbriscoe@cix.compulink.co.uk | And then, you are Father Christmas