RE: 4gl Libraries
Posted in 1998
---------- From: joshua@oklahoma.net[SMTP:joshua@oklahoma.net] Sent: Monday, April 20, 1998 10:16 AM To: informix-list@iiug.org Subject: 4gl Libraries I am in a one man shop, RISC 6000, Informix 4gl Rel 4.11. JL: OK, but time to think about upgrading! I am having problem finding out how to maintain a library of 4gl or C subroutines. It appears that my predecessor could not find out either. JL: Do you know how to handle C libraries? If so, then apart from having to compile x.4gl into x.o before putting it into the library, the techniques are essentially the same. If not, then you need a crash course on libraries on Unix using C. Note that there is some information in the IIUG archive (http://www.iiug.org) about Make and I4GL; you may run into problems with it since it uses the '%.4gl%.c:' notation which not all versions of Make accept. There are several "common" routines that have been copied into numerous programs rather than being placed into a library somewhere. JL: Ugh! Ouch! Don't do it! I have the following 4gl scripts or modules C4GL R4GL script and I4GL. I am able to create object linkable files, but unable to get them to compile into MAIN progs. My manuals are Ref Man 4.0. If you can give me a hint I would appreciate it JL: The rules are somewhat different for p-code and c-code. Maybe you should investigate rdslib and rdslink in the IIUG library for creating and manipulating p-code libraries. Or, there again, maybe not because they use ar(1) format files, but I've never gotten around to handling the AIX format of these - it is (well, used to be; I've not checked in the last 4 years) completely different from the formats on all the other versions of Unix I've ever come across. To create a library of object files: ar rv libmine.a file1.o [...] To use the library in a link line: c4gl -o whatever pfile1.o pfile2.o ... -L/where/you/keep/your/library -lmine Note that you don't need to specify the files in the library separately - that's what a library is for. Writing makefiles for this isn't incredibly hard, either. Yours, Jonathan Leffler (jleffler@visa.com) #include <bother.ms-exchange.h>