Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

help with Pro*C/C++ precompiler error

411930Nov 6 2007 — edited Nov 13 2007
Hello.

I have a little experience working with Pro*C/C++ and now I am trying to learn more by my own.

I think this is an easy question. I am trying to precompile the Thread_example1.pc code from Pro*C/C++ Precompiler Programmer's Guide, Release 9.2 (I am trying it in a windows machine because I have pthreads for windows installed, so that I have commented the DCE_THREADS references).

The thing is I am not able to precompile the code (I have tried several precompiler options).

Now I am getting the error (I am sorry it is in Spanish):

Error semßntico en la lÝnea 126, columna 32, archivo d:\Ejercicios_ProC\MultithreadExample\Thread_example1.pc:
EXEC SQL CONTEXT ALLOCATE :ctx;
...............................1
PCC-S-02322, se ha encontrado un identificador no definido

The thing is that it is defined (outside a EXEC SQL DECLARE section but the precompiler CODE is set to default that does not need to be inside).

If I declare it inside a EXEC SQL DECLARE section I get:

Error semßntico en la lÝnea 105, columna 18, archivo d:\Ejercicios_ProC\MultithreadExample\Thread_example1.pc:
sql_context ctx[THREADS];
.................1
PCC-S-02322, se ha encontrado un identificador no definido

I have also tried writing EXEC SQL CONTEXT USE :ctx[THREADS]; just before the declare section but I get the same error than before.

Can someone help me?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 11 2007
Added on Nov 6 2007
4 comments
3,151 views