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 -> Re: Pro*C++ Question .How to Compile multiple .pc files

Re: Pro*C++ Question .How to Compile multiple .pc files

From: justvrk <justvrk_at_my-deja.com>
Date: Wed, 11 Aug 1999 10:35:41 GMT
Message-ID: <7orjlt$vqq$1@nnrp1.deja.com>


Thanks a lot. It worked.
Actually in the pc modules subsequent to main, we have to #define SQLCA_STORAGE_CLASS extern before we #include<sqlca.h>

Vinayak.

In article <37B04732.8AB5E89_at_Unforgettable.com>,   BluesSax_at_Unforgettable.com wrote:
> You either need to decide that one of your modules (e.g. the one
containing
> main()) is the master module and only define sqlca there. In other
modules
> you must declare sqlca as an extern. The other alternative is to
declare
> sqlca with static storage in the modules - but I generally don't
recommend
> that because it can cause some confusion as to which sqlca is in
effect at
> any given point (it is something that can be known, but few
programmers deal
> with this situation very well).
>
> To define the storage class of sqlca, see the notes in sqlca.h
>
> Basically what you will read there is that in every module except your
> master module you will need to have the following line at the to of
the
> source code file:
>
> #define SQLCA_STORAGE_CLASS extern
>
> That way when the module compiles it will expect the sqlca to be
defined
> elsewhere and then at link time it will be resolved to point to the
sqlca in
> your master module.
>
> Ken
>
> justvrk wrote:
>
> > Hi:
> >
> > I am trying to compile multiple pro*C files into my project under
VC++5.
> > During the linking phase I get the following error message
> >
> > pcOraComm.obj : error LNK2005: "struct sqlca sqlca" (?sqlca@@3U0_at_A)
> > already defined in ExchUtil.obj
> >
> > I have two .pc files pcOraComm.pc and ExchUtil.pc which I have
> > precompiled successfully.
> >
> > Can anybody suggest how should I solve this ?
> >
> > Thanks in Advance.
> > Vinayak
> >
> > Sent via Deja.com http://www.deja.com/
> > Share what you know. Learn what you don't.
>
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Wed Aug 11 1999 - 05:35:41 CDT

Original text of this message

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