Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Unable to link Pro*C/C++ program
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
![]() |
![]() |