using shared libs other than QT/KDE.

Christian Couder chcouder at
Thu Apr 13 07:01:29 UTC 2000

Serge Lussier wrote:

>   Hi,
> I'm making a little, but useful  KDE app using Kdevelop.
> I want to use some zlib functions ( gzxxx() ) to be able
> to compress/uncompress data to/from files.
> My app do works right now, using write pipe << popen ("gzip >
> file","w"); >>
> but I feel it is not elegant.
> My problem is that the only zlib files I have are the shared .so files.
> I don't know how to use shared libs and how it work...
> Is someone cool and kind to be willing to explain to me what I have to
> do ?

Hi Serge,

To link with a shared lib called "libxxx" you need to add a "-lxxx" option
to gcc.
In KDevelop, just use the "Project/Option" to open the project option
dialog and there add the option in the "Linker Options" tab in the "Other
lib" entry.

I don't know the name of the zlib shared .so file, perhaps it's just
"". If I am right, then you just need to add a "-lz" option.

Hope this helps,

More information about the KDevelop mailing list