Skip to Content.
Sympa Menu

mathemagix-devel - Re: [Mathemagix] Configuration of Qt on Mac Os X Leopard

Subject: Mathemagix

List archive

Re: [Mathemagix] Configuration of Qt on Mac Os X Leopard


Chronological Thread 
  • From: Julien Wintz <address@concealed>
  • To: address@concealed
  • Subject: Re: [Mathemagix] Configuration of Qt on Mac Os X Leopard
  • Date: Sun, 24 Feb 2008 11:21:53 +0100

Dear Joris,

Joris van der Hoeven wrote:

I use to install Qt with the regular ./configure make make install method. This results in a clean installation in e.g. /usr/local/Trolltech/Qt-4.3.3 which is better handled by autotools, in particular this does not build frameworks (unless the -framework option is given to configure) but dylibs.

OK. But does this still use Cocoa or Carbon?
What do you mean by regular Qt? Which sources do you take?

By regular I mean getting the source package, e.g. from http://trolltech.com/developer/downloads/qt/mac, and installing them with default path. Of course, the resulting libraries are just the same and use the same foundations as Cocoa for widgets drawing. That is why Qt applications are claimed to be "native".

I actually already compiled from sources and the -framework option
seems to be the default. I recompiled using -no-framework and
obtained something slightly cleaner, but still not very clean:
libtool generates an .so library instead of an .dylib library,
even though the result works...

Qt-4.3.4 has been released several days ago. I installed it yesterday. You are right, the default option is -framework. However, browsing /usr/lib/Trolltech/Qt-4.3.4/lib shows me an ".la" version of each module along with the corresponding framework (QtCore.la QtGui.la and so on).

If dynamic libraries are required, I think libtool should provide a way to replace "-L... -lQtCore" by "-framework QtCore".

Note that this default path is the same under linux, and also that applying a diff on qt-mac and qt-x11 does not show any difference.

I realized that with no additional work many libraries using autotools manage to find the required flags.

Which libraries? I have been searching for an appropriate qt.m4,
but there does not seem to be any standard...

Here is a link to the qt4.m4 used by Lyx: http://www.lyx.org/trac/browser/lyx-devel/trunk/config/qt4.m4.

It does not handle macs and also assumes qt has been installed by some package managers using qt4-devel and qt4-bin which do not match the default install location and renames the binaries like qmake-qt4, uic-qt4, moc-qt4 to avoid compatibility issues with Qt-3xx series. It could however be used as a starting point.

The point is that Qt provides its own build system using the qmake tool and some specific mkspecs to match one platform or another. I'm not aware of a generic solution to embed Qt in another build system except CMake ....

I'll try to find an opensource application using both Qt and libtool to see how they configure all that.

Thanks, Joris

Regards, Ju.



Archive powered by MHonArc 2.6.18.

Top of Page