[Kde-bindings] smoke qt empty builds on macosx

Michael Lawrence lawrence.michael at gene.com
Sat May 8 12:47:22 UTC 2010


On Fri, May 7, 2010 at 1:10 PM, Arno Rehn <arno at arnorehn.de> wrote:

> On Friday 07 May 2010 19:53:52 Petr Vaněk wrote:
> > Dne pátek 07 Květen 2010 12:38:46 Arno Rehn napsal(a):
> > > Why do we need a different header file here? From a quick glance it
> > > appears that nothing's different to qt_includes.h.
> > > If there's really anything platform-specific, try to put it directly
> into
> > > qt_includes.h. The header file has fully-fledged preprocessor support,
> so
> > > you can test for Q_OS_MAC or similar.
> >
> > the problem is in mac's frameworks. I will try to explain it on QtCore
> > case.
> >
> > They are storing includes in
> > /Library/Frameworks/QtCore.framework/Headers
> >
> > so the original qt_includes.h containing
> >
> > #include <QtCore/QtCore>
> >
> > fails because it cannot find a file to include. It must be used as
> >
> > #include <QtCore>
> >
> > Using Q_OS_MAC is not a solution too because macports version of qt4 is
> > using its "unix" location in e.g. /opt/local/share/include/QtCore/QtCore
> >
> > And there is no definition of QT_USING_FRAMEWORKS or something similar in
> > qt4 itself. And never will be (qt4 crew asked already).
> >
> > but maybe the qt_includes.h can be changed to contain <QtCore> only (not
> > <QtCore/QtCore> it should work too because we have -I/usr/include/QtCore/
> > in gcc args too (do we?) - but I did not test it - it's just a quick
> idea.
> > And I cannot test it now. Have to wait until Monday.
> I changed the paths in kde-bindings trunk to be only #include <QtCore> and
> similar. This requires the latest revision of smokegen, because a bug was
> preventing the header files from being found.
> Works on Arch Linux, does it work on your setup as well?
>
>
This looks interesting; I'll have to test it. Btw, to compile the generated
code on Snow Leopard, I had to add the following to
generatorpreprocessor.cpp, in the constructor:

#if defined(Q_OS_DARWIN64)
    exportMacro = new rpp::pp_macro;
    exportMacro->name = IndexedString("__LP64__");
    exportMacro->function_like = false;
    exportMacro->variadics = false;
    m_topBlock->setMacro(exportMacro);
#endif

If you want a formal patch, I can make one.

Thanks,
Michael


> --
> Arno Rehn
> arno at arnorehn.de
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20100508/1adda45f/attachment.html>


More information about the Kde-bindings mailing list