Everett Mills wrote:
For usrcfuncs, you need to look at the code in> Guys-
> I am trying to create a custom runner, so I can give our QA's a
> random sample of lots to test. I downloaded a c function (from IIUG) to
> generate a random number, but when I try to link it, ld errs out. Like
> cfglgo random.c -o myfglgo
> ld: Unsatisfied symbol "usrcfuncs" in file
> ld: Unsatisfied symbol "pushint" in file random.o
> ld: Unsatisfied symbol "popint" in file random.o
> 3 errors.
$INFORMIXDIR/etc/fgiusr.c and either include it in random.c (if you
are only ever going to need the one additional function - or a pair of
them; one to set the seed and one to generate numbers), or copy the
file locally and compile it as a separate object and include it in the
link line. Either way, you need to extend it with the functions you
add to the runner.
For pushint and popint, you should include "fglsys.h" in the C code.
Also, I would expect you to be using retint rather than pushint. You
use pushint when you are putting values on the I4GL stack to be used
by the next called I4GL function; you use retint when you are trying
to return values to the calling function.
No - fglrt.h is unlikely to the answer. It has a purpose, but not> If I read the manual correctly, it needs to include a library called
> fglrt.h. I tried adding it to the C code, but it errs out with this
Not sure. Check in the files list ($INFORMIXDIR/etc/fgpfiles, I> cpp: "random.c", line 7: error 4036: Can't open include file 'fglrt.h'.
> Where does it live? I went to $INFORMIXDIR (/usr/Informix) and ran find
> . -name fglrt.h, but it came up empty.
think) and see whether it is listed in there. If not, then presumably
it comes with the c-code compiler and not the p-code compiler - a
You might need to think about adding /usr/informix/lib/tools, and on> I don't know if it will help, but my LD_LIBRARY_PATH is this:
HP-UX, you need to use LIBPATH rather than LD_LIBRARY_PATH, don't you?
Using gcc can be fun, too. You may need to do some cleanup work in> The platform is HP-UX 11.0 (64 bit), IDS 7.31.FD4, 4GL-RDS 7.31.FC1,
> esql 9.51.FC3 and the c compiler is gcc.
your copy of cfglgo -- you did make a backup first, didn't you (and
you've got the original media somewhere safe, too, haven't you?)
Jonathan Leffler #include <disclaimer.h>
Email: [email]jlefflerearthlink.net[/email], [email]jlefflerus.ibm.com[/email]
Guardian of DBD::Informix v2003.04 -- [url]http://dbi.perl.org/[/url]