Re: IFX 2000 on Linux - posix threads
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Hi, 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. Andreas "Matja¾ Ostrover¹nik" wrote: > > HI ! > > 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? > > Regrads > > Matjaz
Andreas thanks. There is an other question. Asume that I can not use esql command for complete compiling and linkih process (ie. ec->...->binary). 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. 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? Regards Matjaz "Andreas Breitfeld" <andreasb@informix.com> wrote in message news:39D0562F.CB6343FF@informix.com... > Hi, > > 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. > > Andreas > > > "Matja' Ostrover'nik" wrote: > > > > HI ! > > > > 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? > > > > Regrads > > > > Matjaz
Matjaz Ostroversnik wrote: > > 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. You could also add a rule to the Makefile, .ec.o: $(ESQL) -c $*.ec so that both steps are done by the esql driver. I think it is not a very good idea to compile and link the .c output of esql "behind esql's back" so to speak. It's esql that should do the compilation steps (and also link the executable). > 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). I believe that this is because it defaults to -shared so "esql -shared -libs" is the same as "esql -libs". On the other hand, "esql -static -libs" should print something else. But probably -libs is NOT needed if you let esql do the linking of the executable ... -- David Stes Molenstraat 5 B-2018 Antwerpen, Vlaanderen, Belgie Tel +32 3 237 43 54 Fax +32 3 237 40 76 Email stes@pandora.be
Related threads
- HCL Informix on AWS
- Adding a database user
- Encryption at Rest Informix Feature
- Issue with VERCOLS and external tables