This post is related to Red Hat 64-bit with Oracle AS 10.1.2.x, and applicable to any Oracle AS for Linux.
Oracle Application Server Middle-Tier and Infrastructure-Tier come with Pro*C ready. For Linux, the default OH/precomp/admin/pcscfg.cfg C include dir is not able to keep up to date on the continuous GNU C version.
Therefore, following parameter needs to change to reflect GNU C's header location:
Note: This is for Red Hat Enterprise Linux AS release 4, GNU C 3.4.6-10
The only problem with this is that OAS for Linux is always 32-bit. If the makefile.mk is custom made, then it may looks for 64-bit library, and therefore failed to link with libclntsh.so.10.1
The error will be like follow:
/u01/app/oracle/product/mid/lib/libclntsh.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
The solution is to force gcc to use -m32 which will cause 64-bit libraries to emulate 32-bit. Example in the makefile.mk will be
CC=gcc -m32 $ORACLE_HOME/lib/libclntsh.so
Please note about parameter -m32, which is visible by typing "gcc -v --help"
This is advance C compiler information, and will be available in C community. Don't search in Oracle as most of the Pro*C developer are not good in C at all