What is the meaning of that error? Error shows that there is some code compiled but it cannot be linked because some "external" parts are missing (libraries, in this case libclntsh.a or with similar name which is containing this referenced function sqlctx).
Before you can link (get an executable file), you must provide path to the library object file. With gcc you provide this by either -Ldirectory or -lfile. By adding option -lclntsh you command to load such a library. Most likely you should verify that in your libraries paths the file can be found - optionally add the path with -L. Later you might get it statically linked (library gets into your executable) or dynamically (you need to ensure that file like .so or .dll is available under path, ex. under LD_LIBRARY_PATH).
Solution
Just like indicated earlier:
add -L"${ORACLE_PATH}/lib" -lclntsh
option providing paths to where library object file can be found (urually .o or .a) and to load the file.