Re: INFORMIX libsace version 5.x and libgen version 4.x
Posted in 1998
On 18 Jun 1998, Cornelia Schierhorn wrote: > I face a problem and I dunno how to solve it...of course not otherwise I > wouldn't write to this NG. :)) > > I need to compile a file that was written for INFORMIX ESQL/C version 4.x > and therefore I just have this library. BUT I just have an > ESQL/C-compiler version 5.x :(( This is going to be problematic, at best. You cannot mix code compiled with the version 4.x ESQL/C compiler (such as all the code in the ISQL 4.x programs ) with any of the code from a version 5.x ESQL/C compiler. It usually won't link for more reasons than a duplicate symbol definition. > And there is not a single hint in the manuals about the libsace-library. > What did they change ? Well, it would be covered in the 4.1 ISQL Supplement, rather than anywhere else. The custom ACE facility was always more appropriately bundled with ISQL rather than ESQL/C, though for quite a while it was bundled with ESQL/C. However, this linkage was broken prior to the 5.x ESQL/C. The documentation took a while to catch up -- hence the supplement. > Whenever I try to compile my file then it says 'duplicate definition of > 'toerrno'....'. > What can I do ? You need to get hold of a 4.1x ESQL/C compiler to go with your 4.1x ISQL. That will be almost unobtainable -- unless you have (or buy) compiled I4GL where it comes as part of the bundle. If you have compiled I4GL, then compile the ESQL/C file into object code with the c4gl script: c4gl -c source.ec Then link with cace as before: cace -o mysacego ... source.o ... This will work. Most alternatives won't, and any alternative which uses the 5.x ESQL/C in particular is guaranteed to cause trouble sooner or later. There is a potential get-out clause: if the 'ESQL/C' code does not actually call any EXEC SQL (or $) statements, then it could be treated as a C file and that would be OK. You'd want to ensure you pull in the correct headers, which should be in $INFORMIXDIR/include/tools, rather than $INFORMIXDIR/include/esql. Yours, Jonathan Leffler (jleffler@informix.com) #include <witticism.h> Guardian of DBD::Informix -- see http://www.perl.com/CPAN