Re: compiling on linux

0 views
Skip to first unread message

Matthias Gondan

unread,
May 12, 2006, 7:28:02 AM5/12/06
to wx-u...@lists.wxwidgets.org
"-lz" should do it.

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


Mathias Bank

unread,
May 12, 2006, 7:55:20 AM5/12/06
to wx-u...@lists.wxwindows.org
Matthias Gondan <matthias-gondan <at> gmx.de> writes:

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

Mathias Bank

unread,
May 12, 2006, 7:08:11 AM5/12/06
to wx-u...@lists.wxwindows.org

Hans P.

unread,
May 12, 2006, 8:14:31 AM5/12/06
to wx-u...@lists.wxwidgets.org

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

Vadim Zeitlin

unread,
May 12, 2006, 8:51:11 AM5/12/06
to wx-u...@lists.wxwidgets.org
On Fri, 12 May 2006 12:35:06 +0000 (UTC) Mathias Bank <mathia...@daimlerchrysler.com> wrote:

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/


Michael Wetherell

unread,
May 12, 2006, 10:21:40 AM5/12/06
to wx-u...@lists.wxwidgets.org
On Friday 12 May 2006 13:14, Hans P. Palbøl wrote:
> > 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?
>
> 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.

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


Michael Wetherell

unread,
May 12, 2006, 10:27:49 AM5/12/06
to wx-u...@lists.wxwidgets.org
On Friday 12 May 2006 15:21, Michael Wetherell wrote:
> 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`.

Oops I've got that wrong actually, before you waste time trying it out.

Regards,
Mike

Mathias Bank

unread,
May 12, 2006, 8:35:06 AM5/12/06
to wx-u...@lists.wxwindows.org
"Hans P." Palbøl <hans <at> palboel.dk> writes:


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


Mathias Bank

unread,
May 15, 2006, 8:04:14 AM5/15/06
to wx-u...@lists.wxwindows.org


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


Michael Wetherell

unread,
May 15, 2006, 8:28:07 AM5/15/06
to wx-u...@lists.wxwidgets.org
On Monday 15 May 2006 13:04, Mathias Bank wrote:
> Michael Wetherell <mike.wetherell <at> ntlworld.com> writes:
> > On Friday 12 May 2006 15:21, Michael Wetherell wrote:
> > > 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`.
> >
> > Oops I've got that wrong actually, before you waste time trying it
> > out.
> >
> 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?

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

Reply all
Reply to author
Forward
0 new messages