comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Using zlib and IDL 6.1 in a DLM
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Using zlib and IDL 6.1 in a DLM [message #46750] Thu, 22 December 2005 00:59 Go to next message
Maurizio Tomasi is currently offline  Maurizio Tomasi
Messages: 7
Registered: December 2005
Junior Member
Craig Markwardt wrote:
> Maurizio Tomasi <tomasi@lambrate.inaf.it> writes:
>> My question is: how can I tell my DLM to use my zlib library instead
>> of the one provided by IDL?
>
> Static link instead of dynamic?
>
> Good luck!
> Craig

I tried this also (that is, adding "-static -lz" to the end of the line
invoking the compiler), but the result is still the same:

----------------------------------
$ gcc -c -I/opt/idl/idl/external/include test.c -fPIC -DPIC -o test.o
$ gcc -o test.so -shared test.o -L/opt/idl/idl/bin/bin.linux.x86/ -lidl\
-static -lz
$ idl
IDL Version 6.1 (linux x86 m32). (c) 2004, Research Systems, Inc.
Trial version expires on 31-dec-2005.
Licensed for personal use by INAF-Catania only.
All other use is strictly prohibited.
IDL> linkimage, 'PRINT_ZLIB_VERSION', 'test.so'
IDL> print_zlib_version
1.1.4
----------------------------------

I ever tried to manually include every source file of the zlib into the
source code of my app and then linking together all the object files,
but (that *is* incredible) nothing changes!

It begins to be a bit frustrating...

Maurizio.
Re: Using zlib and IDL 6.1 in a DLM [message #46755 is a reply to message #46750] Wed, 21 December 2005 11:51 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Maurizio Tomasi <tomasi@lambrate.inaf.it> writes:
>
> My question is: how can I tell my DLM to use my zlib library instead
> of the one provided by IDL?

Static link instead of dynamic?

Good luck!
Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@REMOVEcow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: Using zlib and IDL 6.1 in a DLM [message #46844 is a reply to message #46750] Fri, 23 December 2005 10:17 Go to previous message
Karl[1] is currently offline  Karl[1]
Messages: 79
Registered: October 2005
Member
Maurizio Tomasi wrote:
> Craig Markwardt wrote:
>> Maurizio Tomasi <tomasi@lambrate.inaf.it> writes:
>>> My question is: how can I tell my DLM to use my zlib library instead
>>> of the one provided by IDL?
>>
>> Static link instead of dynamic?
>>
>> Good luck!
>> Craig
>
> I tried this also (that is, adding "-static -lz" to the end of the line
> invoking the compiler), but the result is still the same:
>
> ----------------------------------
> $ gcc -c -I/opt/idl/idl/external/include test.c -fPIC -DPIC -o test.o
> $ gcc -o test.so -shared test.o -L/opt/idl/idl/bin/bin.linux.x86/ -lidl\
> -static -lz
> $ idl
> IDL Version 6.1 (linux x86 m32). (c) 2004, Research Systems, Inc.
> Trial version expires on 31-dec-2005.
> Licensed for personal use by INAF-Catania only.
> All other use is strictly prohibited.
> IDL> linkimage, 'PRINT_ZLIB_VERSION', 'test.so'
> IDL> print_zlib_version
> 1.1.4
> ----------------------------------
>
> I ever tried to manually include every source file of the zlib into the
> source code of my app and then linking together all the object files,
> but (that *is* incredible) nothing changes!
>
> It begins to be a bit frustrating...
>
> Maurizio.

IDL is overriding the definitions in the shared library. This is
normal linux linker/loader behavior. To stop this from happening, use
-Bsymbolic.

I also found that I had to link the non-shared libz.

So, the linker command that worked for me is:

gcc -shared -o test.so test.o /usr/lib/libz.a -Wl,-Bsymbolic
-L/tmp/idl/bin/bin.linux.x86 -lidl
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Pass by value and performance
Next Topic: Using zlib and IDL 6.1 in a DLM

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 05:51:29 PDT 2025

Total time taken to generate the page: 2.00005 seconds