Re: ObjC data structure for C++/ObjC++ objects?
Re: ObjC data structure for C++/ObjC++ objects?
- Subject: Re: ObjC data structure for C++/ObjC++ objects?
- From: Paul Thomas <email@hidden>
- Date: Sat, 8 Nov 2008 09:07:24 +0000
On 8 Nov 2008, at 05:12, Jonathan Bailey wrote:
Hi Michael -
Thanks much for your response. I actually did originally intend to use
an STL map, but I couldn't get it to work. It seemed that when I added
a C++ object to a map declared as an instance variable within my
ObjC++ class's header file, this generated an "EXC_BAD_ACCESS" signal
- and no exception thrown. As a test, I created a temp STL map in the
implementation/.mm file for this class, and added my C++ object to
that map and it seemed to work fine. So I assumed that templated
classes weren't supported as instance variables for an ObjC++ class.
This sounds like you need to check the GCC_OBJC_CALL_CXX_CDTORS option
in your build settings. Also called "Call C++ Default Ctors/Dtors in
Objective-C"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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