Re: 4GL with C plus plus
Posted in 1996
No direct experience, but ... >From: "Robert G. Miller" <RobertGMiller@worldnet.att.net> >Date: Sat, 26 Oct 1996 18:42:26 -0500 >X-Informix-List-Id: <news.29788> > >Does anyone have any experience using 4GL with C++, calling C++ >functions from 4GL? Are there any special techniques, compared to just >calling c functions? I4GL only knows about C calling conventions. Make sure that any C++ functions written to be called direct from I4GL are declared extern "C" and obey the I4GL calling conventions: extern "C" int i4gl_callable(int nparams); You'll need to ensure you have function prototypes for the functions. Look for fglsys.h under $INFORMIXDIR/incl/tools -- if you don't have it, it's time to upgrade. You'll also need to link with the C++ compiler instead of the C compiler. You should be able to set INFORMIXC=CC (or g++, or ...) on the command line which uses c4gl to do the linking. You may have a bit more work to do to juggle the correct libraries. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>