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: Unable to link Pro*C/C++ program

Re: Unable to link Pro*C/C++ program

From: Kai Horstmann <horst_at_werum.de>
Date: Thu, 23 Jul 1998 23:50:37 +0200
Message-ID: <35B7B02D.410BECB7@werum.de>


Phua Joo Yang schrieb:
>
> Hi all,
>
> I am unable to link my Pro*C/C++ program after I included
> the header file sqlcpr.h and used these 2 functions:
> sqlglm, sqlgls
> Undefined first referenced
> symbol in file
> sqlglm__FPcPUiT1 query.o
> sqlgls__FPcPUiT1 query.o
>
> Did I miss out any libraries?
>
> Please help.
>
> Joo Yang

Hi Joo Yang
you can see of the unresolved symbols, that the compiler recognized these functions as C++-functions and decorated them with type information.

There's an error in include file sqlcpr.h. You must put these lines into the top of the file :

#ifdef __cplusplus
extern "C" {
#endif

and to the bottom

#ifdef __cplusplus
#endif /* extern "C" { */
#endif


This way a C++-Compiler recognizes, that you want to use ANSI-C-functions and not C++.

Good luck
kai Received on Thu Jul 23 1998 - 16:50:37 CDT

Original text of this message

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