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

Home » Public Forums » archive » 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
Using zlib and IDL 6.1 in a DLM [message #46756] Wed, 21 December 2005 10:13 Go to previous message
Maurizio Tomasi is currently offline  Maurizio Tomasi
Messages: 7
Registered: December 2005
Junior Member
Hello to everybody,

I am writing a huge IDL 6.1 program under OpenSUSE Linux 10.0 which
should call some C functions defined using a Dynamic Linked Module.
Those function are already written and use the GTK+ library. They work
fine, however PNG icons are not displayed and instead a "Fatal error in
PNG image file: zlib version error" message is printed (the dialog box
however opens and show a "X" where the image should have been placed).

After some thoughts, I found the problem lies in the fact that the IDL
libraries to be linked with my shared library already provide zlib
functions, but they are from zlib 1.1.4 (while my GTK+ libraries use 1.2.3).

The following test program shows what happens:

----------------------------------
#include <stdio.h>
#include <zlib.h>

int
main (void)
{
puts (zlibVersion ());

return 0;
}
----------------------------------

If I compile and run it, I get the following:

$ gcc -o test2 test2.c -lz
1.2.3
$

Now I modify it so that becomes a shared library:

----------------------------------
#include <stdio.h>
#include <zlib.h>
#include "idl_export.h"

IDL_VPTR
print_zlib_version (void)
{
puts (zlibVersion ());

return NULL;
}
----------------------------------

When I compile the shared library, I get the following:

----------------------------------
$ 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
$ 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
----------------------------------

My question is: how can I tell my DLM to use my zlib library instead of
the one provided by IDL?

Thank you very much,
Maurizio.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Using zlib and IDL 6.1 in a DLM
Next Topic: Handling c++ events in IDL (Virtual Machine)

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

Current Time: Sat Oct 11 14:20:52 PDT 2025

Total time taken to generate the page: 0.64480 seconds