Compile error on RHEL3

  • Link Dupont

    Link Dupont - 2005-01-31

    I'm getting a compile error on RHEL3 when trying to compile the ppmodule.c.

    gcc -DNDEBUG -O2 -g -pipe -march=i386 -mcpu=i686 -D_GNU_SOURCE -fPIC -fPIC -DHAVE_XFT=1 -DIMLIB2=1 -I/usr/X11R6/include -I/usr/include/freetype2 -I/home/linkd/.usr/include -I/usr/include/python2.2 -c ppmodule.c -o build/temp.linux-i686-2.2/ppmodule.o -Wall
    ppmodule.c:316: syntax error before "initppmodule"
    ppmodule.c:316: warning: return type defaults to `int'

    Any pointers where I should look to fix this?
    I suspec that PyMODINIT_FUNC isn't defined, but I can't find in any of the python headers where that macro is defined.

    • Link Dupont

      Link Dupont - 2005-01-31

      I think I just found something..
      /* These macros are defined in Python 2.3 but not 2.2 */
      #ifndef PyMODINIT_FUNC
      #define PyMODINIT_FUNC void

      RHEL3 ships Python 2.2. It looks like perhaps PyPanel depends on Python 2.3 or better?

    • Jon Gelo

      Jon Gelo - 2005-02-01

      Did adding that define work for you?  This should also work ok -

      void initppmodule() {
          (void)Py_InitModule("ppmodule", PPMethods);


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks