I have checked the IBM official site for ESQL/C programming guide. I didn't find exact commands to compile and run. Do I need to install any packages to run? Can anyone tell me the commands to run these in Ubuntu?
How can I compile & and run an ESQL/C program on Linux Platform?
1.8k views Asked by AudioBubble At
1
There are 1 answers
Related Questions in C
- new thread blocks main thread
- Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID
- Display images on Django Template Site
- Difference between list() and dict() with generators
- How can I serialize a numpy array while preserving matrix dimensions?
- Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"
- Why is my program adding int as string (4+7 = 47)?
- store numpy array in mysql
- how to omit the less frequent words from a dictionary in python?
- Update a text file with ( new words+ \n ) after the words is appended into a list
Related Questions in COMPILATION
- new thread blocks main thread
- Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID
- Display images on Django Template Site
- Difference between list() and dict() with generators
- How can I serialize a numpy array while preserving matrix dimensions?
- Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"
- Why is my program adding int as string (4+7 = 47)?
- store numpy array in mysql
- how to omit the less frequent words from a dictionary in python?
- Update a text file with ( new words+ \n ) after the words is appended into a list
Related Questions in INFORMIX
- new thread blocks main thread
- Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID
- Display images on Django Template Site
- Difference between list() and dict() with generators
- How can I serialize a numpy array while preserving matrix dimensions?
- Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"
- Why is my program adding int as string (4+7 = 47)?
- store numpy array in mysql
- how to omit the less frequent words from a dictionary in python?
- Update a text file with ( new words+ \n ) after the words is appended into a list
Related Questions in EMBEDDED-SQL
- new thread blocks main thread
- Extracting viewCount & SubscriberCount from YouTube API V3 for a given channel, where channelID does not equal userID
- Display images on Django Template Site
- Difference between list() and dict() with generators
- How can I serialize a numpy array while preserving matrix dimensions?
- Protractor did not run properly when using browser.wait, msg: "Wait timed out after XXXms"
- Why is my program adding int as string (4+7 = 47)?
- store numpy array in mysql
- how to omit the less frequent words from a dictionary in python?
- Update a text file with ( new words+ \n ) after the words is appended into a list
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
ESQL/C (Embedded SQL in C) uses C code for the bulk of the code, but uses special markers (either
$
in Informix ESQL/C orEXEC SQL
in both standard and Informix ESQL/C) to indicate where SQL statements need preprocessing to be converted into an appropriate series of C library function calls and C variable definitions, etc. Theesql
script is the compiler that automatically converts Informix ESQL/C source into first C and then object code and an executable (under options that are mainly the same as the C compiler's options, most of which are passed to the C compiler unchanged).You need to have the Informix ClientSDK (CSDK) installed to be able to compile ESQL/C programs. That is installed by default when the server is installed, so the chances are you're OK if you're on a machine with a working Informix server on it (if it also has a working C compiler and development environment). It is also available as a separate standalone product which you could install if you don't have, and don't want, an Informix server on your machine. There are advantages for testing if the server is local (quicker access, and less danger of damaging production systems, amongst others).
Assuming you have got CSDK installed, you need to set the environment variable
INFORMIXDIR
to point where the software is installed (unless you chose to install it in/usr/informix
or create a symlink/usr/informix
that points to to where CSDK is installed). You'll also want to add$INFORMIXDIR/bin
to your PATH. You're now ready to compile:Compile
.ec
(ESQL/C source) files to object with theesql
command:Add other C compiler options as needed. Note that
-g
is intercepted by theesql
script and you have to work hard to get it passed to the C compiler.Consider compiling
.c
(C source) files that use an ESQL/C header with theesql
script too. This will pass the correct directory for the headers to the C compiler automatically. More likely, you'll use:For linking, use the
esql
script to do it. It will provide the correct libraries (and object files) to the compiler, which it will invoke as the linker:You can add other libraries and library directories as usual.
You have the program compiled; now you need to run it. The chances are that you won't find the libraries automatically. You will need to think about adding some directories to either
LD_LIBRARY_PATH
or modify/etc/ld.so.conf
to pick up the extra directories, or create symlinks to the Informix libraries from a place that will be picked up automatically (e.g./usr/lib
or/usr/lib64
, or perhaps/usr/local/lib
) to where the libraries are installed.You need to add at minimum:
$INFORMIXDIR/lib
$INFORMIXDIR/lib/esql
Under some circumstances, you may need to add other library directories found under
$INFORMIXDIR/lib
as well, but usually not.You should then be able to run the program. Using
ldd program
will let you know when you've got the settings right.