Re: 4gl Libraries
Posted in 1998
joshua@oklahoma.net wrote: > > I am in a one man shop, RISC 6000, > Informix 4gl Rel 4.11. > > I am having problem finding out how to maintain a library of 4gl or C > subroutines. It appears that my predacessor could not find out > either. > There are several "common" routines that have been copied into > numerous > programs rather than being placed into a library somewhere. 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 > > Thanks, > > Joshua White You might find this dump of one of my library makefiles useful. Note that most of the 4gl files include a commented-out block of testing code which includes a MAIN function and is complied separately from the make. This is for SCO Unix, so you may need to check on your ar command, as Jonathan says. # makefile for ats informix 4gl library # rule for 4gl to archive .4gl.a : c4gl -c $*.4gl @ar rv $@ $*.o @rm -f $*.ec $*.c $*.o # rule for 4gl esql/c to archive .ec.a : c4gl -c $*.ec @ar rv $@ $*.o @rm -f $*.c $*.o # rule for c to archive .c.a : c4gl -c $*.c @ar rv $@ $*.o @rm -f $*.o # rule for 4GL executable (for testing) .4gl.4ge : c4gl $*.4gl $(LIB) -o $*.4ge # rule for per to frm .per.frm : form4gl -q $* .SUFFIXES: .SUFFIXES: .4gl .ec .c .o .per .frm .a .4ge L = libats4gl.a LIB = $(ATSDIR)/lib/$L -llocal L4GL = $(INFORMIXDIR)/lib/tools/lib4gl.a LGEN = $(INFORMIXDIR)/lib/tools/libgen.a LESQL = $(INFORMIXDIR)/lib/esql/libsql.a IINCL = $(INFORMIXDIR)/incl/tools .PRECIOUS: $L # lastkey.o in 4GL 4.10+ $L: $L(beep.o) $L(brtrade.o) $L(bvarname.o) \\ $L(calcrh.o) $L(cat_sep.o) $L(cap.o) $L(causegs.o) $L(causegs4.o) \\ $L(chemairate.o) $L(chemconc.o) $L(chemshift.o) $L(chemstat.o) \\ $L(clr_msg.o) $L(colno.o) $L(consclean.o) $L(constass.o) $L(cornerwin.o) \\ $L(curr_win.o) $L(cursorpos.o) $L(datatype.o) $L(datatypg.o) \\ $L(datatyps.o) $L(datawidth.o) $L(daterang.o) $L(dump_scr.o) \\ $L(editbox.o) $L(error_msg.o) $L(fgl_getpid.o) $L(filer.o) $L(filetype.o) \\ $L(f_unix.o) $L(fmtunit.o) \\ $L(fmtunit4.o) $L(get_cwd.o) $L(get_sql_err.o) $L(get_temp.o) \\ $L(gtabauth.o) $L(instr.o) $L(i4gl_emsg.o) $L(i4gl_msg.o) $L(joinpath.o) \\ $L(lastmove.o) $L(listbox.o) $L(msg_box.o) $L(no_action.o) \\ $L(open_dir.o) $L(packstring.o) $L(permitted.o) $L(pop_win.o) \\ $L(pressret.o) $L(printdata.o) $L(printf.o) $L(printmenu.o) \\ $L(promptyn.o) $L(quietrun.o) $L(q_list.o) $L(right_just.o) \\ $L(save_menu.o) $L(save_sqlca.o) $L(scrmenu.o) $L(scroll.o) \\ $L(setoptions.o) \\ $L(setoptlow.o) $L(size_ok.o) $L(slastkey.o) $L(split.o) \\ $L(stchsub.o) $L(stedit.o) $L(strepeat.o) $L(stsub.o) \\ $L(toasc.o) $L(unix.o) $L(wrap.o) @echo $@ is now up to date. # lib dir is now on DBPATH => install not needed # install: # cp *.frm $(ATSDIR)/db Hope this provides some clues. Like most other folk on the newsgroup, I abandoned the programmers' environment Informix supply in favour of make. -- Peter Lancashire Information Systems Specialist, Bayer plc Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK Tel: +44-1635-562258, Fax: +44-1635-562281 Mail: Peter.Lancashire.PL1@bayer.co.uk --- My Internet plumbing does not allow me to mail and post news together. Sorry. All opinions are my own and not those of Bayer plc. --- Join Infuse, the UK Informix User Group at http://www.infuse.org.uk/