Re: Problem extending python through dynamic loading

Eric Raible (raible@nas.nasa.gov)
Tue, 12 Apr 1994 18:09:17 GMT

In article <SHF2D.94Apr11214204@henson.cs.virginia.edu> shf2d@henson.cs.virginia.edu (Simeon H. Fitch) writes:

blah blah blah

ld $(LIB) -o loadtestmodule.so object1.o object2.o

(where LIB has all the python libraries needed, like libObjects.a, etc.)

causes ld.so (from inside Python) to give me the error:

ld.so: Undefined symbol: ___builtin_new

If instead of ___builtin_new, you meant __builtin_new, that
is the function that g++ uses to allocated memory for the new() operator.
The problem is that you are not linking with libraries that g++ needs.

I've used the following in the past:

void *__builtin_new(int size)
{
return malloc(size);
}

- Eric