Showing results for 
Search instead for 
Did you mean: 

Problem with Pro*C stuff

K!rn Kumr
Frequent Advisor

Problem with Pro*C stuff


I have a strange problem with Pro*C code. When I compile my pro c code to generate and using which i generate object file and then executable. When I compile .c -> .o I use the option +Ofast. When I execute the program and fire a test case I get the output as ora-01001 invalid cursor.

Following are the proc flags that i use.

"userid=$(ORA_USER)" \
"hold_cursor=yes" \
"release_cursor=no" \
"include=$(HLOGINC)" \
"include=$(ORACLE_HOME)/precomp/public" \
"include=$(COMMINC)" \
"include=$(TUXINC)" \
"include=$(CHI2INC)" \
"include=$(INCDIR)" \
"sqlcheck=full" \
"lines=yes" \
"ltype=none" \

I have tried to increase the maxopencursors to 100, but in vain.
Can anyone please let me know a solution.
Dennis Handly
Acclaimed Contributor

Re: Problem with Pro*C stuff

It would be better to continue this in your other thread and copy this new info there:

Since it seems you have an optimization problem, you may want to replace +Ofast by +O2.
Or use +O1=function-name.