• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Linkage and runtime errors when using Objective C++
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linkage and runtime errors when using Objective C++


  • Subject: Re: Linkage and runtime errors when using Objective C++
  • From: John Stiles <email@hidden>
  • Date: Fri, 08 Dec 2006 07:50:38 -0800

A stab in the dark: is ZeroLink turned on?
If so, disable it and see if you get any link errors. ZeroLink is bad!

Vincent Coetzee wrote:
Dear List

I have a (primarily) Cocoa app that has been developed in Objective C, I need to use some external libraries written in C++. I have created a .mm file with glue routines that call the C++ code from within Objective C methods. The project compiles and (seems) to link properly, but when I run it I get

Program received signal:  "EXC_BAD_ACCESS".
mi_cmd_stack_list_frames: Not enough frames in stack.

when the stack is examined in the debugger I have the  traces shown below. I have no clue as to what I am doing incorrectly because although I know C++ I have never before tried mixing C++ and Objective C. My knowledge of the linking and code initialization processes on Mac OS X are also very thin. Any suggestions / help would be appreciated. I know the C++ libraries work correctly because I have other projects that I have used them in, but those projects do not make use of either Objective C or Cocoa, this obviously has something to do with the mixing of the languages.

Thanks in advance

Vincent

#0	??
#1	0x007818dd in llvm::cl::Option::addArgument
#2	0x007a113e in __static_initialization_and_destruction_0
#3	0x8fe12e0f in __dyld__ZN16ImageLoaderMachO16doInitializationERKN11ImageLoader11LinkContextE
#4	0x8fe0cbf3 in __dyld__ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextE
#5	0x8fe101f2 in __dyld__ZN11ImageLoader4linkERKNS_11LinkContextEbNS_18InitializerRunningEb
#6	0x8fe041be in __dyld__ZN4dyld4linkEP11ImageLoaderbNS0_18InitializerRunningE
#7	0x8fe0a5eb in __dyld_NSLinkModule
#8	0x90017a32 in NSLinkModule
#9	0x9388643c in undefinedHandler
#10	0x8fe03b79 in __dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#11	0x8fe03c89 in __dyld__ZN4dyld22flatFindExportedSymbolEPKcPPKN11ImageLoader6SymbolEPPS2_
#12	0x8fe12261 in __dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#13	0x8fe129b5 in __dyld__ZN16ImageLoaderMachO28doBindIndirectSymbolPointersERKN11ImageLoader11LinkContextEbbb
#14	0x8fe14ab4 in __dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextEb
#15	0x8fe0ccfd in __dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextEb
#16	0x8fe100a6 in __dyld__ZN11ImageLoader4linkERKNS_11LinkContextEbNS_18InitializerRunningEb
#17	0x8fe041be in __dyld__ZN4dyld4linkEP11ImageLoaderbNS0_18InitializerRunningE
#18	0x8fe0a5eb in __dyld_NSLinkModule
#19	0x90017a32 in NSLinkModule
#20	0x9388643c in undefinedHandler
#21	0x8fe03b79 in __dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#22	0x8fe03c5c in __dyld__ZN4dyld27findCoalescedExportedSymbolEPKcPPKN11ImageLoader6SymbolEPPS2_
#23	0x8fe120e3 in __dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#24	0x8fe1455e in __dyld__ZN16ImageLoaderMachO25doBindExternalRelocationsERKN11ImageLoader11LinkContextEb
#25	0x8fe14a8a in __dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextEb
#26	0x8fe0ccfd in __dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextEb
#27	0x8fe100a6 in __dyld__ZN11ImageLoader4linkERKNS_11LinkContextEbNS_18InitializerRunningEb
#28	0x8fe041be in __dyld__ZN4dyld4linkEP11ImageLoaderbNS0_18InitializerRunningE
#29	0x8fe0a5eb in __dyld_NSLinkModule
#30	0x90017a32 in NSLinkModule
#31	0x9388643c in undefinedHandler
#32	0x8fe03b79 in __dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#33	0x8fe03c89 in __dyld__ZN4dyld22flatFindExportedSymbolEPKcPPKN11ImageLoader6SymbolEPPS2_
#34	0x8fe12261 in __dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#35	0x8fe1455e in __dyld__ZN16ImageLoaderMachO25doBindExternalRelocationsERKN11ImageLoader11LinkContextEb
#36	0x8fe14a8a in __dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextEb
#37	0x8fe0ccfd in __dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextEb
#38	0x8fe100a6 in __dyld__ZN11ImageLoader4linkERKNS_11LinkContextEbNS_18InitializerRunningEb
#39	0x8fe041be in __dyld__ZN4dyld4linkEP11ImageLoaderbNS0_18InitializerRunningE
#40	0x8fe0a5eb in __dyld_NSLinkModule
#41	0x90017a32 in NSLinkModule
#42	0x9388643c in undefinedHandler
#43	0x8fe03b79 in __dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2_
#44	0x8fe03c5c in __dyld__ZN4dyld27findCoalescedExportedSymbolEPKcPPKN11ImageLoader6SymbolEPPS2_
#45	0x8fe120e3 in __dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0_
#46	0x8fe126e7 in __dyld__ZN16ImageLoaderMachO16doBindLazySymbolEPmRKN11ImageLoader11LinkContextE
#47	0x8fe04c55 in __dyld__ZN4dyld14bindLazySymbolEPK11mach_headerPm
#48	0x8fe1623f in __dyld_stub_binding_helper_interface
#49	??
#50	(null)
#51	(null)
#52	(null)
#53	(null)
#54	(null)
#55	(null)
#56	(null)
#57	(null)
#58	(null)
#59	(null)
#60	(null)
#61	(null)
#62	(null)
#63	(null)
#64	(null)
#65	(null)
#66	(null)
#67	(null)
#68	(null)
#69	(null)
#70	(null)
#71	(null)
#72	(null)
#73	(null)

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Linkage and runtime errors when using Objective C++ (From: Vincent Coetzee <email@hidden>)

  • Prev by Date: Re: Deciding whether text should be black or white for a given background color
  • Next by Date: _NSKeyValueObservationInfoCreateByRemoving crash in CFRetain()
  • Previous by thread: Linkage and runtime errors when using Objective C++
  • Next by thread: Setting color to an NSView
  • Index(es):
    • Date
    • Thread