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

Home » Public Forums » archive » Using callable IDL from a Qt application
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
Using callable IDL from a Qt application [message #58675] Thu, 14 February 2008 01:50 Go to next message
Tiemen is currently offline  Tiemen
Messages: 3
Registered: February 2008
Junior Member
Hello,

I'm trying to link an existing application with IDL on linux, using
lidbidl.so. I started creating a small testing application and
everything went great, I had things up and running quite quickly.
However, the existing application uses Qt (www.trolltech.com) for its
GUI. I want to keep it that way, so I don't want to use IDLs widgets,
I only want IDL to perform some calculations on data provided by the
Qt application.

At this point the trouble started.

Compiling/linking of a small example application seems to go fine, but
starting the program gives me a lot of

"libpngerror: zlib version error"

After which my Qt GUI appears, but without any icons or graphics (as
they are in png format). My best guess is that IDL links with libpng
and/or libz statically instead of dynamically, and that therefore the
wrong zlib is used. So, the normal thing would be to recompile IDL,
but that's a bit hard with commercial software. I've looked into the
possibility to recompile Qt with another static zlib, but this gives a
lot of problems and no solution yet.

I'm using IDL 7, system zlib version: 1.2.3.

Hope you can help. If you need any more information I will of course
be happy to supply. I can supply a simple program which will
demonstrate the problem if you wish (needs Qt, and maybe it won't show
the problem if your zlib differs or so).

Thanks in advance,

Tiemen

PS Of course I've asked both IDL and Qt for support, but Qt mainly
seems to think the problem is at IDL and IDL is quite slow to reply,
so I thought about you guys :)
Re: Using callable IDL from a Qt application [message #58762 is a reply to message #58675] Thu, 14 February 2008 07:24 Go to previous message
Tiemen is currently offline  Tiemen
Messages: 3
Registered: February 2008
Junior Member
On Feb 14, 3:53 pm, Nigel Wade <n...@ion.le.ac.uk> wrote:
> Tiemen wrote:
>> Hello,
>
>> I'm trying to link an existing application with IDL on linux, using
>> lidbidl.so. I started creating a small testing application and
>> everything went great, I had things up and running quite quickly.
>> However, the existing application uses Qt (www.trolltech.com) for its
>> GUI. I want to keep it that way, so I don't want to use IDLs widgets,
>> I only want IDL to perform some calculations on data provided by the
>> Qt application.
>
>> At this point the trouble started.
>
>> Compiling/linking of a small example application seems to go fine, but
>> starting the program gives me a lot of
>
>> "libpngerror: zlib version error"
>
>> After which my Qt GUI appears, but without any icons or graphics (as
>> they are in png format). My best guess is that IDL links with libpng
>> and/or libz statically instead of dynamically, and that therefore the
>> wrong zlib is used. So, the normal thing would be to recompile IDL,
>> but that's a bit hard with commercial software. I've looked into the
>> possibility to recompile Qt with another static zlib, but this gives a
>> lot of problems and no solution yet.
>
>> I'm using IDL 7, system zlib version: 1.2.3.
>
>> Hope you can help. If you need any more information I will of course
>> be happy to supply. I can supply a simple program which will
>> demonstrate the problem if you wish (needs Qt, and maybe it won't show
>> the problem if your zlib differs or so).
>
>> Thanks in advance,
>
>> Tiemen
>
>> PS Of course I've asked both IDL and Qt for support, but Qt mainly
>> seems to think the problem is at IDL and IDL is quite slow to reply,
>> so I thought about you guys :)
>
> From a simple test it would appear that, yes, IDL is statically linked against
> zlib (or at least it contains some of the zlib functions). A C program which
> links against libidl and prints the value of zlibVersion() outputs 1.1.4.
>
> Try specifying -zlib before -lidl on the link. This ought to ensure that calls
> to zlib routines are resolved by zlib rather than libidl. When I do this with
> the above program I get 1.2.1.2, which is the value of the system zlib version.
>
> --
> Nigel Wade, System Administrator, Space Plasma Physics Group,
>             University of Leicester, Leicester, LE1 7RH, UK
> E-mail :    n...@ion.le.ac.uk
> Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

You just made my day :)

(although it is -lz instead of -zlib)

Thanks a lot!

Tiemen
Re: Using callable IDL from a Qt application [message #58764 is a reply to message #58675] Thu, 14 February 2008 06:53 Go to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
Tiemen wrote:

> Hello,
>
> I'm trying to link an existing application with IDL on linux, using
> lidbidl.so. I started creating a small testing application and
> everything went great, I had things up and running quite quickly.
> However, the existing application uses Qt (www.trolltech.com) for its
> GUI. I want to keep it that way, so I don't want to use IDLs widgets,
> I only want IDL to perform some calculations on data provided by the
> Qt application.
>
> At this point the trouble started.
>
> Compiling/linking of a small example application seems to go fine, but
> starting the program gives me a lot of
>
> "libpngerror: zlib version error"
>
> After which my Qt GUI appears, but without any icons or graphics (as
> they are in png format). My best guess is that IDL links with libpng
> and/or libz statically instead of dynamically, and that therefore the
> wrong zlib is used. So, the normal thing would be to recompile IDL,
> but that's a bit hard with commercial software. I've looked into the
> possibility to recompile Qt with another static zlib, but this gives a
> lot of problems and no solution yet.
>
> I'm using IDL 7, system zlib version: 1.2.3.
>
> Hope you can help. If you need any more information I will of course
> be happy to supply. I can supply a simple program which will
> demonstrate the problem if you wish (needs Qt, and maybe it won't show
> the problem if your zlib differs or so).
>
> Thanks in advance,
>
> Tiemen
>
> PS Of course I've asked both IDL and Qt for support, but Qt mainly
> seems to think the problem is at IDL and IDL is quite slow to reply,
> so I thought about you guys :)

From a simple test it would appear that, yes, IDL is statically linked against
zlib (or at least it contains some of the zlib functions). A C program which
links against libidl and prints the value of zlibVersion() outputs 1.1.4.

Try specifying -zlib before -lidl on the link. This ought to ensure that calls
to zlib routines are resolved by zlib rather than libidl. When I do this with
the above program I get 1.2.1.2, which is the value of the system zlib version.

--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Re: Using callable IDL from a Qt application [message #58767 is a reply to message #58675] Thu, 14 February 2008 05:17 Go to previous message
Tiemen is currently offline  Tiemen
Messages: 3
Registered: February 2008
Junior Member
AOn Feb 14, 10:50 am, Tiemen <tsc...@gmail.com> wrote:
> Hello,
>
> I'm trying to link an existing application with IDL on linux, using
> lidbidl.so. I started creating a small testing application and
> everything went great, I had things up and running quite quickly.
> However, the existing application uses Qt (www.trolltech.com) for its
> GUI. I want to keep it that way, so I don't want to use IDLs widgets,
> I only want IDL to perform some calculations on data provided by the
> Qt application.
>
> At this point the trouble started.
>
> Compiling/linking of a small example application seems to go fine, but
> starting the program gives me a lot of
>
> "libpngerror: zlib version error"
>
> After which my Qt GUI appears, but without any icons or graphics (as
> they are in png format). My best guess is that IDL links with libpng
> and/or libz statically instead of dynamically, and that therefore the
> wrong zlib is used. So, the normal thing would be to recompile IDL,
> but that's a bit hard with commercial software. I've looked into the
> possibility to recompile Qt with another static zlib, but this gives a
> lot of problems and no solution yet.
>
> I'm using IDL 7, system zlib version: 1.2.3.
>
> Hope you can help. If you need any more information I will of course
> be happy to supply. I can supply a simple program which will
> demonstrate the problem if you wish (needs Qt, and maybe it won't show
> the problem if your zlib differs or so).
>
> Thanks in advance,
>
> Tiemen
>
> PS Of course I've asked both IDL and Qt for support, but Qt mainly
> seems to think the problem is at IDL and IDL is quite slow to reply,
> so I thought about you guys :)

A related question to which perhaps more people know the answer: which
version of zlib does idl7 use? I fail to find this anywhere, and it
seems that if I just get the same version on my system this may solve
the problem as well (although it is not a very elegant solution).

Thanks,

Tiemen
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Object as a member to object/class
Next Topic: Re: IDLVM arguments

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

Current Time: Wed Oct 08 13:49:02 PDT 2025

Total time taken to generate the page: 0.21056 seconds