After that link the .o to libraries and produce the exe.
cc -o exe_name -L $ORACLE_HOME/lib -lclntsh
This is an obscure way of doing things. Generate a make file and try to put all your options in that. Also, read the txt doc attached for more details.