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
.ec
file compiled with theesql
program (script), you can use the-e
option to 'Preprocess only, no compilation or linking'.This produces
esqlcode.c
fromesqlcode.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
esql
script traditionally left the intermediate.c
file lying around. My ESQL/Cmake
rules all remove the generated.c
file as a separate post-compilation step:with appropriate definitions of suffixes, macros, etc.
The
esql
commandUsing the Informix
esql
compiler (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
esqlc
is for the 'real' preprocessor,$INFORMIXDIR/lib/esqlc
. The usage foresql
is for theesql
script itself — which is what you are primarily using. Theesqlcargs
in theesql
usage 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.