Re: Need esqlc HP-UX thread library consultant/guru



koreilly@xxxxxxxxxxx wrote:
Have a esql program similar to demo1.ec that must run with the thread
libraries on HP-UX 11.11.

When a 'esql -thread program.ec -o program' is run, the program works.

However when the following 2 steps are run with a compile and link it
does not work (run time errors are 'State was 01I01 and code was 0'):

1. 'esql -thread program.ec'.

2. cc program.c -o program \

You need to compile the ESQL/C code to object - and then do the linking.
I'm 99% sure there are options to the C compiler that ensure thread safety that you're not using in this compile and link line.


Or, use 'esql -c -thread program.ec' and then replace 'program.c' with program.o.

And, best of all, use esql to do the linking -- since it works.

-I$INFORMIXDIR/incl/esql \
-Wl,-v,-s,+s,-a,shared_archive,-L$INFORMIXDIR/lib
-L$INFORMIXDIR/lib/esql \
-lthsql -lthasf -lthgen -lthos -lifgls \
-lnsl_s -lm -lsec -lnsl_s \
/home/informix/lib/esql/checkapi.o -lifglx \
-lpthread

A 'chatr program' on the version that works and version does not work
is similar.

Why do you think it is better to link without the esql script? I'd go to great lengths to use it.


--
Jonathan Leffler                   #include <disclaimer.h>
Email: jleffler@xxxxxxxxxxxxx, jleffler@xxxxxxxxxx
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
.



Relevant Pages

  • Re: merge of character strings
    ... I suspect the point at issue is mergewhere the lengths of the scalar character strings tsource and fsource are not known at compile time but turn out to be equal at run time. ...
    (comp.lang.fortran)
  • Re: Wrap text dont ajust height
    ... Paulo Filipe wrote: ... The line lengths were very long (just because ... fixed before the code would compile. ... it might indicate a problem with the TableLayout ...
    (comp.lang.java.gui)
  • Re: long beep?
    ... On 25 Dic, 04:00, jellybean stonerfish ... lengths. ... If you can't compile there may be an rpm here ...
    (comp.unix.shell)
  • Code that ties up the compiler
    ... I saw a piece of code that - when you went to compile it - ... Does anybody know the type of code that does/did occupy the compiler ... for great lengths of time? ... Andrew Thompson ...
    (comp.lang.java.programmer)
  • Re: long beep?
    ... if i want a long beep non-stop sound??? ... A nice little program for beeping with adjustable pitches and ... lengths. ... If you can compile, try: http://www.johnath.com/beep/ ...
    (comp.unix.shell)