C linkage in C++
C linkage in C++
- Subject: C linkage in C++
- From: Avi Flamholz <email@hidden>
- Date: Tue, 29 Nov 2005 20:29:46 -0500
I am working on a extending an open source XCode project. The project
consists of library code (in C), an interface (Interface Builder), and
a controller (Objective-C). I decided to extend the library code with
C++, as I wanted an object oriented language, and I am unfamiliar with
Objective-C. So I wrote my routine in C++ and I wrote a C wrapper.
Normally, when you make a C wrapper for C++, you use the 'extern "C"'
prefix for the function header so that the linker knows to use C-style
function symbols, rather than the mangled C++ kind. When I do this,
however, XCode balks, throwing the following errors:
warning prebinding disabled because dependent library
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit is not
searchable
multiple definitions of symbol _neighborcluster
(where neighborcluster is the name of my routine).
I generally don't care how I make the routine C-callable, but I need
to make it so, as I have already written ~500 lines of code, and I do
not know Objective-C well enough to rewrite it fast enough. I am new
to both the project I am working on, and to XCode, so any help would
be much appreciated.
Does anyone know what the problem might be?
Thanks so much,
-Avi
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden