PDA

View Full Version : Qt .ui-files and python2.4



fg_psycho
21st July 2006, 14:45
Hello,

I´m running already a application under python 2.2 and Qt 3.0.5. I´m trying now to uprade to python 2.4 and Qt 3.3.4, but I run into follwing problem:

The header file Python.h newly must be include as the very first on, also before all of the system headers, otherwise I get following compiler warning/error:

In file included from /usr/include/python/Python.h:8,
from ...
from ...
/usr/include/python/pyconfig.h:835:1: warning: "_POSIX_C_SOURCE" redefined

Even it is manageable for self written code, it is not working for dynamically generated code like .ui files. It´s only possible to specify which file you want to include, but the order is always the same. First the system header and than user headers specified like in that construct:

<includes>
<include location="local" impldecl="in declaration">Python.h</include>
</includes>

Is there any way to solve this problem of sequence, maybe a makefile definition or something like that? Any help/suggestions would be appreciated

Thanks ahead

wysota
19th August 2006, 12:07
You could probably use #ifdef-#undef-#endif chain to undefine _POSIX_C_SOURCE, so that it doesn't get redefined. Anyway, it's only a warning, isn't it?