Re: Dynamic SQL method 4 problem

From: Scott Urman <surman_at_oracle.com>
Date: 1996/07/01
Message-ID: <4r90ip$q6r_at_inet-nntp-gw-1.us.oracle.com>#1/1


In article <31D457D7.6354_at_luke.ssg2.com>, Tony Chan <tntchan_at_luke.ssg2.com> writes:
|> I am having a problem compiling sample10.pc with my HP C++ compiler.
|>
|> The compiler errors look like:
|> CC: "sample10.c", line 401: error: undefined function sqlclu called
|> (1286)
|> CC: "sample10.c", line 542: error: unexpected 1 argument for sqlald()
|> (1265)
|> CC: "sample10.c", line 835: error: unexpected 1 argument for sqlnul()
|> (1265)
|>
|> Does anyone have success compiling these library functions with a C++
|> compiler?
|>
|> Any help is much appreciated.
|>
|> email me at: tntchan_at_csua.berkeley.edu

Embedded SQL in C++ is not supported unless you are using Pro*C version 2.1 (with Oracle 7.2) or higher. Use the CODE=CPP option when you precompile. The problem here is the declarations of the sqllib functions - they are not declared using the extern "C" {} notation required for a C++ compiler unless you use the CODE=CPP option. See the Pro*C manual for more information.

-- 
------------------------------------------------------------------------
Scott Urman            Oracle Corporation           surman_at_us.oracle.com
------------------------------------------------------------------------
Author of _Oracle PL/SQL Programming_ ISBN 0-07-882176-2
Published by Oracle Press - http://www.osborne.com/oracle/index.htm
------------------------------------------------------------------------
"The opinions expressed here are my own, and are not necessarily that of
 Oracle Corporation"
------------------------------------------------------------------------
Received on Mon Jul 01 1996 - 00:00:00 CEST

Original text of this message