Re: Accessing C++ class method from ObjC++ code
Re: Accessing C++ class method from ObjC++ code
- Subject: Re: Accessing C++ class method from ObjC++ code
- From: Charles Hamel <email@hidden>
- Date: Sun, 18 Nov 2007 12:22:51 -0500
Forgot to mention,
this is running on XCode 3.0 under 10.5.1.
Charles
On 18-Nov-07, at 12:21 PM, Charles Hamel wrote:
Hi
I have a C++ class definition in a file that looks like this:
class Vision {
public: void analyze(NSMutableArray* a);
};
The implementation of this class in located in a seperate file (.mm
extension) and compiled as Obj-C++ code.
I have an AppController ObjC class that has as an instance variable
of pointer to a Vision object. The AppController.mm file is also
compiled as Obj-C++. AppController.mm imports AppController.h which
in turns imports Vision.h.
In one of AppController's method, I call this : vision-
>analyze(newArray);
Everything compiles fine, except linker says :
"Vision::analyze(NSMutableArray*)", referenced from:
-[AppController testAction:] in AppController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
I have tried to specify the symbol visibility using
__attribute__((visibility("default"))) but that failed as well.
What am I missing ?
Thank you
Charles
e
_______________________________________________
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
_______________________________________________
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