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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Pro*C/VC++/NT: struct sqlca already defined???

Re: Pro*C/VC++/NT: struct sqlca already defined???

From: sm <sm_at_nowhere.com>
Date: 1997/08/12
Message-ID: <33efb289.29655722@newshost.us.oracle.com>#1/1

On Fri, 08 Aug 1997 11:17:19 +0100, Dietmar Leibecke <Dietmar.Leibecke_at_gamos.de.---> wrote:

Include sqlca.h using the Pro*C syntax.... EXEC SQL INCLUDE sqlca;

Also, the usage of SQLCA_STORAGE_CLASS is documented in sqlca.h

Hope this helps.
-sm

>Markus,
>
>thanks for your input.
>
>Markus Schöpflin wrote:
>>
>> Easy.
>>
>> In one of you modules, do the following:
>>
>> #define SQLCA_STORAGE_CLASS extern
>> #include <sqlca.h>
>> extern struct sqlca sqlca;
>>
>> Markus
>
>I've been testing this now for an hour and couldn't get it to work. The
>compiler seems to ignore the SQLCA_STORAGE definition. The error
>messages stay constant.
>
>The situation:
>
>FILE1.PC
>--------
>...
>#define SQLCA_STORAGE_CLASS extern
>#include <sqlca.h>
>...
>
>FILE2.PC
>--------
>...
>#include <sqlca.h>
>...
>
>Linker error:
>FILE2.obj : error LNK2005: "struct sqlca sqlca" (?sqlca@@3U0_at_A) already
>defined in FILE1.obj
>
>The preprocessed output includes the extern declaration for sqlca. Even
>if I define SQLCA_STORAGE_CLASS in both files, the linker doesn't work!
>
>Any more information???
>
>TIA,
>
> Dietmar Leibecke
> (Dietmar.Leibecke_at_gamos.de)
Received on Tue Aug 12 1997 - 00:00:00 CDT

Original text of this message

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