Mathias Bank schrieb:
> Hallo everybody,
>
> I have used wxWidgets on windows and everything worked fine. No, i have to
> compile my application on linux. But I'm not able to compile wxWidgets
> correctly: On Windows, I am linking my project with wxzlibd.lib. I can't get
> this library on linux. How do I have to configure wxwidgets to get this library?
>
> Sincerelly
>
> M. Bank
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-u...@lists.wxwidgets.org
> For additional commands, e-mail: wx-use...@lists.wxwidgets.org
>
>
>
>
> "-lz" should do it.
>
Well, ./configure -lz doesn't work, make -lz works but doesn't help
Until now I use following steps:
./configure --enable-zipstream --enable-fs_zip --disable-monolithic
--with-zlib --prefix=/opt/wx/2.6/
make & make install
M. Bank
Since the library names differ on various platforms and configs, the
easiest way is to use `wx-config --libs`. It will give you the linker
line matching whatever config you used when building wx.
Cheers,
Hans
MB> Of course, the library isn't called wxzlibd.lib, I think, it could be namend
MB> libwxzlib.so. But this file (or a file which is called nearly like this) cannot
MB> be found. wx-config doesn't either show a file called '*zlib*'. I'm still
MB> searching.
What exactly is the error message you get when linking your program using
wx-config?
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Also note that wxzlib isn't included in the libs returned by `wx-config
--libs` when using dynamic linking since apps don't usually use it
directly.
You can get it using '--libs zlib' but AFAIK in that case you need to
specify all the other libs you need too. e.g `wx-config --libs xrc qa
html adv core xml net zlib`.
HTH,
Mike
Oops I've got that wrong actually, before you waste time trying it out.
Regards,
Mike
>
> Since the library names differ on various platforms and configs, the
> easiest way is to use `wx-config --libs`. It will give you the linker
> line matching whatever config you used when building wx.
>
> Cheers,
> Hans
>
Of course, the library isn't called wxzlibd.lib, I think, it could be namend
libwxzlib.so. But this file (or a file which is called nearly like this) cannot
be found. wx-config doesn't either show a file called '*zlib*'. I'm still
searching.
Cheers
M. Bank
Well, "--libs zlib" returns, that I should use "-lwx_gtk2u_zlib-2.6". So we know
that the lib is called libwx_gtk2u_zlib-2.6.so. But this file is not in the
lib-directory of wxWidgets. Where can I find it?
I have configured the library with './configure --enable-zipstream
--enable-fs_zip --with-zlib --enable-shared --prefix=/opt/wx/2.6'
Regards,
M. Bank
Hi,
I'm afraid I got that wrong, "--libs zlib" doesn't return the right
name.
> I have configured the library with './configure --enable-zipstream
> --enable-fs_zip --with-zlib --enable-shared --prefix=/opt/wx/2.6'
Most linux machines will have zlib installed already, so wxWidget's
configure will detect that and use it instead of the built in one. So,
in that case adding '-lz' to your application's link line should work
(as Matthias said).
I don't think there's anything you could do to be more general, i.e. to
detect when the built-in has been used and link to that one instead.
Regards,
Mike