Hi I have small pro c program
To compile this program i used following commands in cygwinCode:#include <stdio.h> #include <string.h> #include <sqlda.h> #include <sqlcpr.h> int main() { char ch; int sal; EXEC SQL BEGIN DECLARE SECTION; char oracleid[20] = "scott/lion"; EXEC SQL END DECLARE SECTION; printf("Connected to Oracle8i using Scott/Tiger\n"); EXEC SQL CONNECT :oracleid; EXEC SQL WHENEVER sqlerror goto errexit; printf("Connected to Oracle8i using Scott/Tiger\n"); errexit: printf("Connection failed"); }
$ORACLE_HOME/bin/proc test.pc
cc -I${ORACLE_HOME}/precomp/public -c test.c
cc -o test test.o -L $ORACLE_HOME/precomp/lib -l orasql11
With above command program is compiling and linking fine. But when i am running the exe, it is not printing anything. Even if it is not printing the printf statement at the very begining of the code
Can anybody help why this is happening
Thanks
Sas