Re: More on dynamic loading

Jose M. Pereira (pereira%jmp@inesc.pt)
Fri, 15 Apr 1994 23:52:46 GMT

>>>>> "Guido" == Guido van Rossum <Guido.van.Rossum@cwi.nl> writes:
In article <9404131258.AA14296=guido@voorn.cwi.nl> Guido.van.Rossum@cwi.nl writes:
>>
>> g++ -c testmodule.C -o testmodule.o
>> ld -o testmodule.so testmodule.0 -lg++
>>
>> Whenever I try to load the object in Python I get the error:
>>
>> ld.so: Undefined symbol: ___builtin_new
...
>> supposed to get linked in, isn't, although I would have thought that
>> these C++ constructs would have been covered by the inclusion of
>> '-lg++' in the making of the .so file.

Guido> I would think that your -lg++ should already take care of this. Maybe
Guido> there's ANOTHER library (linked by default by g++) that you also need?
Guido> (Try something like g++ --verbose on a simple main.c program to see
Guido> what libraries it links with.)

Guido almost got it ;-)

Was might have happened is that Simeon didn't link libgcc.a with the rest
("gcc" instead of "ld" would have done it automagically).

To use standard ld, note that libgcc is inside the private gcc installation
directory.

--

---------------------------------------------------------------------- Jose' Pereira

INESC (Inst. Eng. Sistemas e Computadores) R. Alves Redol 9, 6. 1000 Lisboa, PORTUGAL. Phone.: +351 1 3100223 Fax...: +351 1 525843 e-mail: jmp@inesc.pt PSI...: %(0268)004010314::inesc::jmp

No news is good news.