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 
Return to the default flat view Create a new topic Submit Reply
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
[Message index]
 
Read Message
Read Message
Read Message
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: Sat Oct 11 21:07:13 PDT 2025

Total time taken to generate the page: 0.24351 seconds