<br><br><div class="gmail_quote">On Fri, May 7, 2010 at 1:10 PM, Arno Rehn <span dir="ltr"><<a href="mailto:arno@arnorehn.de">arno@arnorehn.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Friday 07 May 2010 19:53:52 Petr Vaněk wrote:<br>
> Dne pátek 07 Květen 2010 12:38:46 Arno Rehn napsal(a):<br>
</div><div class="im">> > Why do we need a different header file here? From a quick glance it<br>
> > appears that nothing's different to qt_includes.h.<br>
> > If there's really anything platform-specific, try to put it directly into<br>
> > qt_includes.h. The header file has fully-fledged preprocessor support, so<br>
> > you can test for Q_OS_MAC or similar.<br>
><br>
> the problem is in mac's frameworks. I will try to explain it on QtCore<br>
> case.<br>
><br>
> They are storing includes in<br>
> /Library/Frameworks/QtCore.framework/Headers<br>
><br>
> so the original qt_includes.h containing<br>
><br>
> #include <QtCore/QtCore><br>
><br>
> fails because it cannot find a file to include. It must be used as<br>
><br>
> #include <QtCore><br>
><br>
> Using Q_OS_MAC is not a solution too because macports version of qt4 is<br>
> using its "unix" location in e.g. /opt/local/share/include/QtCore/QtCore<br>
><br>
> And there is no definition of QT_USING_FRAMEWORKS or something similar in<br>
> qt4 itself. And never will be (qt4 crew asked already).<br>
><br>
> but maybe the qt_includes.h can be changed to contain <QtCore> only (not<br>
> <QtCore/QtCore> it should work too because we have -I/usr/include/QtCore/<br>
> in gcc args too (do we?) - but I did not test it - it's just a quick idea.<br>
> And I cannot test it now. Have to wait until Monday.<br>
</div>I changed the paths in kde-bindings trunk to be only #include <QtCore> and<br>
similar. This requires the latest revision of smokegen, because a bug was<br>
preventing the header files from being found.<br>
Works on Arch Linux, does it work on your setup as well?<br>
<div class="im"><br></div></blockquote><div><br>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:<br>
<br>#if defined(Q_OS_DARWIN64)<br>    exportMacro = new rpp::pp_macro;<br>    exportMacro->name = IndexedString("__LP64__");<br>    exportMacro->function_like = false;<br>    exportMacro->variadics = false;<br>
    m_topBlock->setMacro(exportMacro);<br>#endif<br><br>If you want a formal patch, I can make one.<br><br>Thanks,<br>Michael<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">
--<br>
Arno Rehn<br>
<a href="mailto:arno@arnorehn.de">arno@arnorehn.de</a><br>
_______________________________________________<br>
</div><div><div></div><div class="h5">Kde-bindings mailing list<br>
<a href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-bindings" target="_blank">https://mail.kde.org/mailman/listinfo/kde-bindings</a><br>
</div></div></blockquote></div><br>