Re: Question on mixing ESQL/C and C++
Posted in 1995
In article <1995Aug24.030536.16621@lmpsbbs.comm.mot.com>, <ennis@rastov10.comm.mot.com> writes: > Does anyone out there have experience mixing ESQl/C and C++? > The only instruction that I have is an old tech bulletin from Informix. > I am running Online version 7.10 with ESQL version 7.1. > > The tech bulletin says something about creating a header file with > all of the Informix library functions declared as prototypes. I tried > this and keep geetting symbol refernce errors. See below. > Undefined first referenced > symbol in file > _iqnprep(char*, char*) guif_table.o > sqlca guif_table.o > _iqclose(_sqcursor*) guif_table.o --etc.-- > ld: fatal: Symbol referencing errors. No output written to a.out Make sure you have the extern "C" qualifier in the header file, since your compiler will do that C++ name-mangling thing otherwise and not be able to find these functions in the Informix library you need to link with (I don't know what that libarary is...).