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: Dietmar Leibecke <Dietmar.Leibecke_at_gamos.de.--->
Date: 1997/08/08
Message-ID: <33EAF22F.A14@gamos.de.--->#1/1

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 Fri Aug 08 1997 - 00:00:00 CDT

Original text of this message

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