Re: CFLAGS and LDFLAGS in 4GL 7.20UD1?
Posted in 1998
Richard Spitz wrote: > I have several 4GL projects that need header files and libraries that > are not in the standard path. Under 4GL 4.11, I used the CFLAGS and > LDFLAGS environment variables to point the compiler and linker to > the right directories, using the "-I/<path-to-.h-files>" and > "-L/<path-to-libraries>" options. Are you using make or are you talking about the c4gl script itself? I'm not aware that 4.11 c4gl paid any attention to either variable. The more recent versions of I4GL (4.12 onwards, roughly) have support for a C4GLFLAGS environment variable which would do for the job you're looking to do -- bundle up both your current CFLAGS and LDFLAGS into C4GLFLAGS. Can you show that c4gl used these variables? What does this yield: egrep '(C|LD)FLAGS' $INFORMIXDIR/bin/c4gl Given that you're working on Sinix, it is possible that this was an addition made by the Siemens engineers who ported I4GL in those days. > Now I'm porting these projects to 4GL 7.20UD1 (on SINIX/Reliant Unix > 5.43C20), and the environment variables don't seem to be used any more. > I couldn't find any mention of them in the 4GL 6.0 reference manual, > either. Although the variables are set and exported ok, I get error > messages about missing header files or libraries. > > Does that mean I cannot use the "Program" option of i4gl any more to > build programs that need components not in the standard path? Well, you could hack the version of the C4GL script you've got; all current versions of the i4gl program use c4gl to do the compilations. Strictly; precisely so that hacks in the c4gl script are available to i4gl too, whereas older versions used the nominal lines from the c4gl script to do the job, which meant you could not pass special arguments (not even -a for array bound checking) reliably. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>