Mailing List Archive

SGI C++ compile errors
I am trying to compile an SGI C++ source
file which contains the call Py_Initializ() but I
get the following error messages:

"/usr/people/beall/dev/Python-1.2/Include/mymalloc.h", line 64:
error(3419):
more than one instance of overloaded function "malloc" has "C"

linkage
extern ANY *malloc Py_PROTO((size_t));
^

"/usr/people/beall/dev/Python-1.2/Include/mymalloc.h", line 65:
error(3419):
more than one instance of overloaded function "calloc" has "C"

linkage
extern ANY *calloc Py_PROTO((size_t, size_t));
^
Can anybody tell me how to fix this?

Thanks,
Jerry Tietz
SGI C++ compile errors [ In reply to ]
Jerry Tietz <tietz@psych.ucsb.edu> said:
> I am trying to compile an SGI C++ source
> file which contains the call Py_Initializ() but I
> get the following error messages:
>
> "/usr/people/beall/dev/Python-1.2/Include/mymalloc.h", line 64:

Whew! That's really Python 1.2? Can you use the current
version of Python, which is 1.5.2?

It looks like you're hitting something related to the
Great Renaming. It's before my time, but as I understand
it, things like a Python-defined "malloc" have since been
renamed to Py_Malloc to fix this problem.

My shot in the dark guess is to comment out those two lines
and force casting if the compiler gives warnings elsewhere.

But you really should upgrade to the latest Python.

Andrew Dalke
dalke@bioreason.com