![]() |
【转帖】mac os x gcc 3.3 link problems with 1.13
mac os x / gcc 3.3 link problems with 1.13
mac os x / gcc 3.3 link problems with 1.13 i am having troubles getting the 1.13 libraries to link using gcc 3.3. i'm using the libraries included in dd_macosx.tar.gz. i get the following errors when i link to libstdc++. ld: for architecture ppc ld: multiple definitions of symbol _zdapv.eh /usr/lib/libstdc++.a(del_opv.o) private external definition of absolute _zdapv.eh (value 0x0) /dd/lib/macosx//dd_macosx_alloc.a(odallocop.o) definition of _zdapv.eh in section (__text,__eh_frame) ld: multiple definitions of symbol _zdapvrkst9nothrow_t.eh /usr/lib/libstdc++.a(del_opvnt.o) private external definition of absolute _zdapvrkst9nothrow_t.eh (value 0x0) /dd/lib/macosx//dd_macosx_alloc.a(odallocop.o) definition of absolute _zdapvrkst9nothrow_t.eh (value 0x0) ld: multiple definitions of symbol _zdlpv.eh /usr/lib/libstdc++.a(del_op.o) private external definition of absolute _zdlpv.eh (value 0x0) /dd/lib/macosx//dd_macosx_alloc.a(odallocop.o) definition of _zdlpv.eh in section (__text,__eh_frame) ld: multiple definitions of symbol _zdlpvrkst9nothrow_t.eh /usr/lib/libstdc++.a(del_opnt.o) private external definition of absolute _zdlpvrkst9nothrow_t.eh (value 0x0) etc. any ideas on how to solve this? you might try leaving out our dd_macosx_odalloc.a library, and instead including definitions for the following functions in your source code: extern "c" { allocdll_export void* odrxalloc(size_t s) { return ::malloc( s ); } allocdll_export void* odrxrealloc(void* p, size_t new_size, size_t /*old_size*/) { return ::realloc( p, new_size ); } allocdll_export void odrxfree(void* p) { ::free( p ); } } // extern "c" ok, that worked. i'm now getting 3 unresolved externals: __zn16odsispatialindex12createobjectebjj __zn9odsishape13koverallspacee __zn9odsishape8knospacee these don't seem to be documented anywhere. is there some way i can include these in my code as well? you need to link in dd_macosx_spatialindex.a. ok, thanks for your help. |
所有的时间均为北京时间。 现在的时间是 08:09 PM. |