Compiling 32 bit app on 64 bit kernal

I've been trying to compile an application that works on AIX 5L in 32 bit mode on an AIX 5L 64 bit mode machine. In doing so I get a lot of undefined symbol errors.

Below is a sample of what the output looks like.....

%make -f makefile_hl7 all
cc -L/u01/app/oracle/product/10.2.0/lib32/ -o hl7_post -g -D_ORACLE_ -D_HL7_ obj_hl7/post obj_hl7/p_history.o
/u01/app/oracle/product/10.2.0/precomp/lib32/libsql10.a
-L/u01/app/oracle/product/10.2.0/lib32/ -lclntsh -lld -lm `cat /u01/app/oracle/product/10.2.0/lib32/sysliblist`
-lm -lc_r -lpthreads
ld: 0711-317 ERROR: Undefined symbol: .lcvb2w
ld: 0711-317 ERROR: Undefined symbol: .upih2o
ld: 0711-317 ERROR: Undefined symbol: .upiico
ld: 0711-317 ERROR: Undefined symbol: .lxldini
ld: 0711-317 ERROR: Undefined symbol: .lmsaicmt
ld: 0711-317 ERROR: Undefined symbol: .lxmopen
ld: 0711-317 ERROR: Undefined symbol: .lxoWriChar

are you pointing to 32 bit library files in your library path?

Yes,
In the command line below you can see that I'm pointing to lib32 so I think I got that covered unless I'm missing one.

cc -L/u01/app/oracle/product/10.2.0/lib32/ -o hl7_post -g -D_ORACLE_ -D_HL7_
obj_hl7/post obj_hl7/p_history.o
/u01/app/oracle/product/10.2.0/precomp/lib32/libsql10.a
-L/u01/app/oracle/product/10.2.0/lib32/ -lclntsh -lld -lm `cat /u01/app/oracle/product/10.2.0/lib32/sysliblist`
-lm -lc_r -lpthreads

I got it to work,

I ended up having to use....
/u01/app/oracle/product/10.2.0/precomp/lib/libsql10.a which is for 64 bit mode
instead of....
/u01/app/oracle/product/10.2.0/precomp/lib32/libsql10.a which is for 32 bit mode.

So I can only assume that there is something funky with the libsql10.a for 32 bit mode that prevented the symbols from being defined.

Nevertheless my 32 bit mode code now compiles and runs properly on the 64 bit mode kernal AIX 5L system.