I'm working on a migration project. I need to convert ESQL/C files which have .ec extension into c file on gcc. I know that ESQL/C program will create a .c file. But How can I get that?
FYI : I'm working on IBM Informix server.
I'm working on a migration project. I need to convert ESQL/C files which have .ec extension into c file on gcc. I know that ESQL/C program will create a .c file. But How can I get that?
FYI : I'm working on IBM Informix server.
Copyright © 2021 Jogjafile Inc.
TL;DR — For an Informix
.ecfile compiled with theesqlprogram (script), you can use the-eoption to 'Preprocess only, no compilation or linking'.This produces
esqlcode.cfromesqlcode.ec. (Ignore my previous comment about 'sufficiently recent'; you won't be using a version that isn't sufficiently recent — my memory is failing once more.)The
esqlscript traditionally left the intermediate.cfile lying around. My ESQL/Cmakerules all remove the generated.cfile as a separate post-compilation step:with appropriate definitions of suffixes, macros, etc.
The
esqlcommandUsing the Informix
esqlcompiler (script), you can run it with no options to get a help message like this (try not to be scared: there's actually the usages for two commands):The usage for
esqlcis for the 'real' preprocessor,$INFORMIXDIR/lib/esqlc. The usage foresqlis for theesqlscript itself — which is what you are primarily using. Theesqlcargsin theesqlusage are the ones that are listed foresqlc— they're passed through by the script to the program.This output is from ESQL/C 4.10 associated with Informix 12.10. I won't bore you with a history of the ESQL/C version numbers.