Неожиданно вылезла проблема при включении Python.h и png.h в один модуль. Если png.h идет первым, сыпятся ворнинги (с -Wall)
In file included from /usr/include/python2.6/Python.h:8,
from src/../include/image.hpp:5,
from src/image.cpp:5:
/usr/include/python2.6/pyconfig.h:1031:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/malloc.h:24,
from src/image.cpp:1:
/usr/include/features.h:158:1: warning: this is the location of the previous definition
In file included from /usr/include/python2.6/Python.h:8,
from src/../include/image.hpp:5,
from src/image.cpp:5:
/usr/include/python2.6/pyconfig.h:1040:1: warning: "_XOPEN_SOURCE" redefined
In file included from /usr/include/malloc.h:24,
from src/image.cpp:1:
/usr/include/features.h:160:1: warning: this is the location of the previous definition
Если Python.h идет первым, вылетает ощибка
In file included from /usr/include/python2.6/Python.h:8,
from src/../include/image.hpp:5,
from src/image.cpp:2:
/usr/include/python2.6/pyconfig.h:1031:1: warning: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/malloc.h:24,
from src/image.cpp:1:
/usr/include/features.h:158:1: warning: this is the location of the previous definition
In file included from /usr/include/python2.6/Python.h:8,
from src/../include/image.hpp:5,
from src/image.cpp:2:
/usr/include/python2.6/pyconfig.h:1040:1: warning: "_XOPEN_SOURCE" redefined
In file included from /usr/include/malloc.h:24,
from src/image.cpp:1:
/usr/include/features.h:160:1: warning: this is the location of the previous definition
In file included from /usr/include/png.h:518,
from src/image.cpp:6:
/usr/include/pngconf.h:371: error: expected constructor, destructor, or type conversion before ‘.’ token
/usr/include/pngconf.h:372: error: ‘__dont__’ does not name a type
Кто нить может сказать что с этим делать, кроме как разнести использование png.h и Python.h по разным модулям?