[vox-tech] Qt/C++ libraries question

R. Douglas Barbieri vox-tech@lists.lugod.org
Wed, 5 Nov 2003 15:09:40 -0800


--EeQfGwPcQSOJBaQU
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Nov 05, 2003 at 01:50:15AM -0800, David Margolis wrote:
> In case anybody cares, the answer to my question is this:

I definitely care, and this could come in handy some day. Thanks for
posting how you did it!

>=20
> 1. rebuild qt itself to support the static library (./configure -static;
> make).  this adds a libqt.a where you have the various
> libqt.so files.
>=20
> 2. once you have this in place you can just throw -static onto your g++
> command line or into your makefile
>=20
> 3. since qt/mac is not the same as qt/x11 (qt/mac speaks directly to aqua)
> you have to do the above steps on a mac.  for any other unix a
> cross-compile would work.
>=20
> 4. now give your (obviously more bloated because of the static build)
> application to your mac buddy.
>=20
> 5. if time/cleverness permits, bundle everything in the correct place
> within a directory with a .app extension to bring
> the double-clickable mac experience to your application (note: i haven't
> figured this one out quite yet, but i'm doing some reading right now).
>=20
> Thanks to everyone who replied!
> Dave
>=20
> On Tue, 4 Nov 2003, Matt Holland wrote:
>=20
> > On Tuesday, November 4, 2003, at 01:22 AM, David Margolis wrote:
> >
> > > Hello,
> > >
> > > I don't know if there are many Qt developers on this list, but this
> > > seems
> > > like it might be more of a C++/gcc question anyway.
> > >
> > > I have built a Qt app on my Linux box that _should_ run on Mac OSX.
> > > To do
> > > this I am supposed to statically link the qt library.
> > >
> > > 1. I don't know how I am supposed to move/compile/whatever this
> > > library.
> >
> > Do you have a Mac OS X machine to play around on?  If so, the way to
> > get open source libraries (and software in general) is Fink
> > (http://fink.sourceforge.net).  Qt versions 2 and 3 are available in
> > Fink.
> >
> > If you are planning to cross-compile, I know nothing about that.
> >
> > > 2. I don't know where to put it or how to call it _statically_ from my
> > > app.
> >
> > The question isn't how to call the functions, but how to link the
> > library.  I think (warning: I could be wrong) that gcc will generally
> > tell the linker to use a dynamic library if it is available, and
> > otherwise will link a static library.  I'm pretty sure that you can
> > pass an option to gcc to change this behavior.
> >
> > You might check out http://fink.sourceforge.net/doc/porting/index.php
> > for some tips on porting apps to OS X.  It covers some weird little
> > details that you should be aware of.
> >
> > Good luck!
> > Matt
> >
> > > Any ideas (or URLs or anything) would be greatly appreciated.
> > >
> > > Thanks,
> > > Dave Margolis
> > >
> > > _______________________________________________
> > > vox-tech mailing list
> > > vox-tech@lists.lugod.org
> > > http://lists.lugod.org/mailman/listinfo/vox-tech
> > >
> > >
> > --
> > Matt Holland
> > Population Biology Graduate Group
> > University of California
> > Davis, CA 95616
> >
> > _______________________________________________
> > vox-tech mailing list
> > vox-tech@lists.lugod.org
> > http://lists.lugod.org/mailman/listinfo/vox-tech
> >
>=20
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech

--=20
R. Douglas Barbieri
doug@dooglio.net
http://www.dooglio.net

GPG Fingerprint : FE6A 6A57 2B95 7594 E534  BFEE 45F1 9E5E F30A 8A27
MIT.edu recv-key: C55B91D4
GPG Public key  : http://www.dooglio.net/dooglio.asc

--EeQfGwPcQSOJBaQU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iQCVAwUBP6mDNEXxnl7zCoonAQIOKQP+O1P6bkBpL9+Dch5giIdz/XS7ZH2/Koq7
JAeETtltm5+kqcq+dvC3sGyxotG7GRI7savDOiw0/Lxd2YRqzNsAxd5WKkm4f66N
DB4TMGeuxxMyKRT2DN28lndldKdsL+eWJn/26oFrFhBEU8sUTDxv0VnueqXGU+R6
L2Qa02WhFsM=
=vxWT
-----END PGP SIGNATURE-----

--EeQfGwPcQSOJBaQU--