Re: IFX 2000 on Linux - posix threads
Posted in 2000
On Tue, 26 Sep 2000, Matjaz Ostroversnik wrote: >Andreas thanks. > >There is an other question. Asume that I can not use esql command for >complete compiling and linkih process (ie. ec->...->binary). I don't assume that; why can't you use the esql command for the compiling process? Come to that, why can't you use it for the linking process, either? >Up to now I had a make file, which first translated ec file into a c >file and later compile and link them with other project files into one >or more executables. And you had to ensure that you passed the correct -I options to the latter compilation. >I was using esql -libs command to obtain the names of libraries that >should be used for linking process. When I try the same with -shared >switch I get the same list of libraries (i.e. output of esql -libs is >equivalent with esql -shared -libs). One could assume that the >libraries should not be the same. Do you know which libraries to use? Well, 'esql -libs' and 'esql -shared -libs' should produce the same output except perhaps on machines where static libraries are preferred (some older HP-UX ports, for instance). If you want to do threading, you need to tell it that: esql -shared -thread -libs esql -static -thread -libs However, I think you will be better off working out how to use the esql script as part of the linking process. Also, note that there is usually an object file listed with the shared libraries, as well as various libraries. >"Andreas Breitfeld" <andreasb@informix.com> wrote: >> for Linux Client SDK 2.40.UC1 which includes ESQL/C I found following >> information in release notes $INFORMIXDIR/release/en_us/0333/ESQLC_9.3: >> >> 3. Thread-safe ESQL/C libraries are supported on this platform using >> POSIX threads. >> >> For thread-safe library support, the 'esql' script can be invoked >> with the "-thread" flag. You must have the environment variable >> THREADLIB set to "POSIX" in the calling environment before >> invoking esql. For example: >> >> (Bourne/Korn shell syntax): >> >> THREADLIB=POSIX >> export THREADLIB >> esql -thread mythreadapp.ec -o mythreadapp >> >> >> (C shell syntax): >> >> setenv THREADLIB POSIX >> esql -thread mythreadapp.ec -o mythreadapp >> >> Applications that have NOT been compiled with the -thread option >> CANNOT be linked with applications that HAVE been compiled with >> the -thread option. To use threads in an application, compile ALL >> of its modules with the "-thread" option. >> >> "Matja' Ostrover'nik" wrote: >> > I'd like to write an application server with ESQL/C on Linux (RH 6.2). >> > I'd like to use Posix threads. The documentation available >> > claims that Informix: >> > 1. 1st place : "only DCE threads are supported" >> > 2. 2nd place: "posix threads are supported on Solaris" >> > >> > What is true? >> > Was anyone capable of using posix threads together with >> > informix on Linux? -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"