I am trying to create an esql program BUT within it I need to open and
close a UNIXodbc datasource. Because of this I'm having problems.
I can compile EITHER eqsl OR the ODBC code but I do'nt know how to put
them together.
What would be the best approach?
↪ replying to kjuliff@gmail.com
On 30 Jun 2006 13:12:46 -0700, kjuliff@gmail.com <kjuliff@gmail.com> wrote:
> I am trying to create an esql program BUT within it I need to open and
> close a UNIXodbc datasource. Because of this I'm having problems.
>
> I can compile EITHER eqsl OR the ODBC code but I do'nt know how to put
> them together.
>
> What would be the best approach?
cc -I/usr/unixodbc/include -c odbcfile.c
esql -c esqlfile.ec
esql -o program odbcfile.o esqlfile.o -L/usr/unixodbc/lib -lodbc
What this does is compiles the ESQL/C source with the ESQL/C compiler.
It compiles the ODBC source with the correct ODBC headers.
It links the ESQL/C object and the ODBC object with the ESQL/C
libraries (supplied implicitly by the esql script) and the ODBC
libraries (specified on the command line). If, perchance, you had an
ODBC compiler script instead of just using the C compiler direct,
you'd tell ESQL/C that the 'C compiler' was the hypothetical but
implausible ODBC compiler script by setting INFORMIXC=odbcc in the
environment.
Did you try this? What was the trouble?
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/