There are a few different things that could be occurring:
How you defined LD_LIBRARY_PATH.
A problem the Pro*C pre-compiler has with your code.
If you are mixing C and C++ code it could be the compiler you are using doesn't accept the way your are doing it.
The reason is that sqlca.h conflicts Tuxedo and Oracle Database.
Solution is here:
CFLAGS="-I$ORACLE_HOME/precomp/public" buildserver -f ...
remove your $TUXDIR/include/sqlca.h (it is for Tuxedo/SQL, if you are not using it)