Re: Where is sqlcex?

From: Michael Marsden <mmarsden_at_netcom.com>
Date: 1995/07/01
Message-ID: <mmarsdenDB0n03.2BM_at_netcom.com>#1/1


Anders Jonsson (ajons_at_ctp.com) wrote:
: Hej
: ^^^
: I have created a simple application that uses PRO*C. I am using the
: parameter CODE=ANSI_C. When I try to link the application the linker
: tells me that sqlcex is undefined although I link the application with
: libsql.a.
 

: What is the problem?
: Is there a special set of libs to use with CODE=ANSI_C?
: Is there any documentation or sample makefiles that shows which libs
: to link?

I have come across this problem once or twice when trying to link PRO*C programs in slightly unorthadox ways. I think you'll find that your problem is that you are trying to link PRO*C from seperately compiled object files - like when you are creating shared object libraries (.so) etc.

OK - I admit that ORACLE claim you cannot do this but there is a solution - (Not neat admittedly).
Create a header file - something like this /* foo.h */
#ifdef FOOSQLCEX
#define FOOSQLCEX
int dummy_function ( &a, &b, &c ...)
{

   void sqlcex ( a, b, c ... )
}
#endif

You'll need to check the header files to get the exact syntax of the call. What does this do ?
Include foo.h in each module that is failing to link. Although you never call the dummy_function, the linker will see it and include it in the symbol table - thus allowing you to call the dynamic shared object file anyhow !

If anybody has discovered a neater way of doing this, please followup here.

Regards
Michael

-- 
Michael Marsden                   "It's the car, right ? Chicks dig the car"
ORACLE Database Consultant                              -- BATMAN Forever --
mmarsden_at_netcom.com, mmarsden_at_ozemail.com.au  
Disclaimer: I own the company so I can say what I like !
Received on Sat Jul 01 1995 - 00:00:00 CEST

Original text of this message