Re: C UDR Routines on HPUX 11.11
Posted in 2006
On Tue, 2006-03-28 at 11:17, Bart Huls wrote: > Hi Jonathan, > > Can you point me out how and which libraries I must use because I can't > seem > to find them. > Haven't a clue, presumably the documentation that told you how to use those functions should say. > Regards, > > Bart > > > > "Jonathan Stowe" <jns@gellyfish.com> schreef in bericht > news:<mailman.188.1143532762.18205.informix-list@iiug.org>... > > On Tue, 2006-03-28 at 08:49, Bart Huls wrote: > > > Hi, > > > > > > I'm trying to compile a c-based routine against a IBM Informix > Dynamic > > > Server Version 9.40.FC5 > > > > > > I'm trying to compile the route with > > > gcc -Wall -shared -DMISERVBUILD -fPIC -I$INFORMIXDIR/incl/public > -I$INFORMIXDIR/incl/esql > > > -I$INFORMIXDIR/incl -c reverse.c -o reverse.o > > > > > > ld -dy -G -dynamic -o reverse.bld reverse.o > > > > > > I'm getting: > > > rm: reverse.bld non-existent > > > ld: (Warning) At least one PA 2.0 object file (reverse.o) was > detected. The > > > linked output may not run on a PA 1.x system. > > > ld: Unsatisfied symbols: > > > mi_lvarchar_to_string (code) > > > mi_free (code) > > > mi_alloc (code) > > > mi_string_to_lvarchar (code) > > > mi_get_varlen (code) > > > > Looks like you are missing the library that defines the above - you > need > > to supply that on the command line as well. > > > > > ld: No $UNWIND_END$ subspace has been defined (probably missing > > > /usr/ccs/lib/crt0.o) > > > > > > So it looks like that compiling is OK. But linking won't work. > > > > > > Regards, > > > > > > Bart > > > > > > > > > > > > The Routine is: > > > //----------------------- > > > #include <stdio.h> > > > #include <mi.h> > > > #include <ctype.h> > > > > > > mi_lvarchar *reverse(mi_lvarchar *str, MI_FPARAM *fparam) > > > { > > > int i,n; > > > char *buff; > > > mi_lvarchar *str_o; > > > > > > n=mi_get_varlen(str); > > > > > > buff=(char *)mi_alloc((n+1)*sizeof(char)); > > > > > > buff=(char *)mi_lvarchar_to_string(str); > > > > > > for (i=0;i<(n>>1);i++) > > > { > > > char c; > > > c = *(buff+i); > > > *(buff+i) = *(buff+n-1-i); > > > *(buff+n-1-i) = c; > > > } > > > > > > str_o=mi_string_to_lvarchar(buff); > > > > > > mi_free(buff); > > > > > > return (str_o); > > > } > > > //----------------------- > > > > > > > > > _______________________________________________ > > > Informix-list mailing list > > > Informix-list@iiug.org > > > http://www.iiug.org/mailman/listinfo/informix-list > > -- > > > > This e-mail is sponsored by http://www.integration-house.com/ > > -- This e-mail is sponsored by http://www.integration-house.com/