Re: esql libixsql.so error
Posted in 1998
In article <6l1tr1$v76$1@nnrp1.dejanews.com>, sjsyau@my-dejanews.com
writes
>I try to compile and run the following ec, the compiling is fine, but when I
>run it, I got error:
>
>ld.so.1: 1: fatal: libixsql.so: can't open file: errno=2
>
>I found the libixsql.so is in $INFORMIXDIR/lib/esql
>
Check your release notes under $INFORMIXDIR/release
You need to set an environment variable to locate shared libraries...
Probably
LD_LIBRARY_PATH=$INFORMXDIR/lib/esql
or
LPATH=$INFORMXDIR/lib/esql
or
SHLIB==$INFORMXDIR/lib/esql
[Depends on your UNIX version].
Also try running
man ld
to find the environment variable you need to set...
>The program:
>
>#include <stdio.h>
>EXEC SQL include sqlca;
>EXEC SQL include sqltypes;
>
>EXEC SQL define PROCESSING_LEN 16;
>
>main(argc, argv)
>int argc;
>char *argv[];
>{
> EXEC SQL begin declare section;
> int o_error;
> int o_count;
> int o_instance;
> int o_order_num;
> char o_processingunit[ PROCESSING_LEN + 1 ];
> EXEC SQL end declare section;
>
> printf("DEMO1 sample ESQL program running.\\n\\n");
>
> EXEC SQL connect to 'stores7';
>
> EXEC SQL declare democursor cursor for
> execute procedure ttt(1, 2, -1, 1, "HRO", "AAA") ;>
>
> EXEC SQL open democursor;
> for (;;)
> {
> EXEC SQL fetch democursor
> into :o_error, :o_count, :o_instance, :o_order_num;
> if (SQLCODE == SQLNOTFOUND)
> break;
> printf("==> %d %d %d %d\\n", o_error, o_count, o_instance,
>o_order_num);
>
> }
> EXEC SQL close democursor;
> EXEC SQL disconnect current;
> printf("Program is over!\\n");
>}
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/ Now offering spam-free web-based newsreading
--
David Williams
Maintainer of the Informix FAQ
Primary site (Beta Version) http://www.smooth1.demon.co.uk
Official site http://www.iiug.org/techinfo/faq/faq_top.html
I see you standin', Standin' on your own, It's such a lonely place for you, For
you to be If you need a shoulder, Or if you need a friend, I'll be here
standing, Until the bitter end...
So don't chastise me Or think I, I mean you harm...
All I ever wanted Was for you To know that I care