Re: Using DataBlade API Functions
Posted in 1998
In article <Pine.SV4.3.94.980728101530.24982C-100000@aludra.usc.edu>,
Carlos <carlosfe@aludra.usc.edu> wrote:
>Hi.
>
>I'm trying to compile a simple C program that uses a couple of the
>DataBlade API functions [specifically, mi_open() and mi_close()]. I know
>I need to #include the header files mi.h or milib.h, but I am also going
>to need to link my program with the library where the functions are
>actually defined when I compile it.
>
>My question is whether anyone has any idea where these libraries might be
>located on my system. I've been looking around, but I don't even know
>what to look for... milib.a, milib.so, libmilib.a??? Nobody around here
>who might know is responding to my e-mails...
>
>I'm using IUS 9.12.UC2 on Solaris 2.5.1
>My INFORMIXDIR is set to '/export/pkgs/informix/9.12'
>
>Any suggestions will be enormously appreciated. Thank you.
>
>--
>Carlos J. F.
>
Hi Carlos,
The library to use depends on whether you are writing a DataBlade or if
you are writing a client program that will communicate to the Informix
server.
If you are writing a 'bladelet' , i.e. a shallow DataBlade that supports
a couple of basic functions, then you should probably start with the
DBDK BladeSmith, which will generate your initial program stubs and
makefiles for both Windows NT and UNIX. The library this will link in is
sapi.lib on Windows NT. These links are resolved when the oninit process
attempts to load the .so file that comprises your DataBlade.
WARNING! Resolving the DMI library calls in this method for client apps
will not work.
If you are writing a client application and are using the LibDMI to be
your API for server communication then you need to get ahold of the
ClientSDK version 2.0. This package includes the link libaries for the
client LibDMI, libifdmi.a and libthdmi.a . WARNING! Don't use these libraries
for building a DataBlade. Suffice it to say, the DataBlade won't work the
way you expect it to.k
If you are writing a client application, I am curious why you would choose
the LibDMI libraries instead of more encouraged ESQL/C or CLI?
Albert Landeck
landeck@informix.com
landeck@math.ohio-state.edu