Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> compile error from PRO*C output.....HELP!!!!!

compile error from PRO*C output.....HELP!!!!!

From: <skudsi_at_my-deja.com>
Date: Wed, 23 Feb 2000 20:01:37 GMT
Message-ID: <891eav$aqu$1@nnrp1.deja.com>


Hi all,
After PRO*C makes it pass and changes the EXEC SQL statements , I am getting an error from my c compiler , it is complaining about this line generated by PROC*
struct sqlexd sqlstm ;
erorr : sqlexd is an undefined struct , although PRO*C does define the sqlexd at the beginning of the file??? And here is how it defines it:

static struct sqlexd {

   unsigned int sqlvsn;
   unsigned int arrsiz;
   unsigned int iters;

   unsigned int   offset;
   unsigned short selerr;
   unsigned short sqlety;
   unsigned int   occurs;
      const short *cud;
   unsigned char  *sqlest;
      const char  *stmt;

   sqladts *sqladtp;
   sqltdss *sqltdsp;
            void  **sqphsv;
   unsigned int   *sqphsl;
            int   *sqphss;
            void  **sqpind;
            int   *sqpins;
   unsigned int   *sqparm;
   unsigned int   **sqparc;

   unsigned short *sqpadto;
   unsigned short *sqptdso;

            void *sqhstv[5];
   unsigned int sqhstl[5];

            int   sqhsts[5];
            void  *sqindv[5];
            int   sqinds[5];

   unsigned int sqharm[5];
   unsigned int   *sqharc[5];
   unsigned short  sqadto[5];
   unsigned short  sqtdso[5];

} sqlstm = {10,5}; // is this syntax fine???

the wierd thing is that when PRO*C translates the EXEC SQL CONNECT .... it decalres an sqlexd struct of the same name "sqlstm" as the global one it declared but in a private scope as follows..

{
struct sqlexd sqlstm;

//sets the members

}

what could be making the compiler think sqlexd isn't defined... please help , I am stuck on this one for a while now( several hours ) Thanks,
Sam K.

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Feb 23 2000 - 14:01:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US