This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

OSX shared libs: any ideas?


Hi,

I know that Apple's version of gcc is not official and all that but this
seems a reasonable place to ask, as IIRC some Apple people working on the
devel tools hang out here. This is MacOS X with the May 2001 Apple devel
kit.

Any thoughts on why this is happening:

---
(sakura ~/OpenCL-0.7.5)$ c++ -shared -fPIC -lz <a list of object files> -o libopencl-0.7.5.so
/usr/bin/ld: Undefined symbols:
_main
___builtin_delete
___eprintf
___pure_virtual
___rtti_si
___rtti_user
___throw
_terminate__Fv
___check_eh_spec
___cp_pop_exception
___cp_push_exception
___eh_alloc
___start_cp_handler
___tf9exception
___ti9exception
___vt_9exception
___builtin_vec_delete
___builtin_vec_new
___builtin_new
___dynamic_cast
___lshrdi3
___ashldi3
___rtti_class
___udivdi3
___umoddi3
restFP
saveFP

(sakura ~/OpenCL-0.7.5)$ c++ -v
Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs
Apple Computer, Inc. version gcc-926, based on gcc version 2.95.2 19991024 (release)
---

1) Linking these objects into an ar lib and linking my app will work fine
2) This hasn't happened to me before on any system, so I don't think it's
pilot error re using PIC or whatever

3) Unrelated: how the #@%@%^ do I set the soname with Apple's ld? Yes, this
has nothing at all to do with gcc, but while I'm here, why not?

Thanks,

Jack



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]