RE: Undefined Symbols weirdness
RE: Undefined Symbols weirdness
- Subject: RE: Undefined Symbols weirdness
- From: Jeff Laing <email@hidden>
- Date: Fri, 12 Nov 2004 15:53:23 +1100
> So I had to convert some .c to .cp files in my XCode 1.2 project.
> Since XCode cannot handle .c files that include any .h file with a
> class declaration in it, I had to switch ALL my .c files over to .cp.
Its not XCode that can't handle .h files with class declarations in them,
its the C compiler itself, and rightly so, C is *not* C++
Having said that, whenever you blindly turn .c into .cpp, you need to
remember to surround all function prototypes in your C++ header files with
extern "C" {
...
};
if you want those functions to be linkable from C as well as C++. I'm
guessing that you have a function thats now in a .cp file that used to be in
a .c file - because its now C++, its name gets mangled. You have a
reference from some other .c file which is still C, and does not know about
the mangling.
Jeff Laing <email@hidden>
----------------------------------------------------------------------------
--
A complex system designed from scratch never works and cannot be patched up
to
make it work. You have to start over, beginning with a working simple
system.
-- J Gall. "Systemantics: How systems work and how they
fail"
_______________________________________________
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