Re: Objectiv-C++ to ANSI-C++ problem
Re: Objectiv-C++ to ANSI-C++ problem
- Subject: Re: Objectiv-C++ to ANSI-C++ problem
- From: "M. Uli Kusterer" <email@hidden>
- Date: Wed, 14 Jan 2004 10:17:12 +0100
At 10:23 Uhr +0900 14.01.2004, Hire wrote:
I am developing a sample application using COCOA and Objective-C++.
This sample application need to use existing carbonized framework.
This framework was developed using CodeWarrior and C++.
In sample code I am able to declare C++ object. Also using "new"
operator I can create instance of c++ object. But while deleting that
object using "delete" operator EXC_BAD_ACESS signal is raised.
You can't link a C++ library built with CodeWarrior into Project
Builder. The V-Table is layed out differently by the two compilers.
If you want to use C++, you have to use the same compiler, or two
otherwise binary-compatible compilers (I don't think the latter
exists on OS X right now).
The usual workaround is to wrap the library's code in a C or
Objective C API, which, *are* binary compatible on the Mac.
This is a well-known problem with many C++ compilers, and has been
for years (I remember the author of MacZoop mentioning this way back
in '98, when he was implementing a plugin-interface.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.