Re: "Unknown symbol" though file is in the project
Re: "Unknown symbol" though file is in the project
- Subject: Re: "Unknown symbol" though file is in the project
- From: Sailesh Agrawal <email@hidden>
- Date: Mon, 18 Jul 2005 16:48:36 -0700
Red Marble Games wrote:
> This is surely a FAQ, because I'm so new to XCode, but help would be
> appreciated. Some of my code seems to be ignored by the linker, even
> though the relevant files are in the project, the "target" box is
> checked in the file listing, and XCode is generating .o and .ob files
> and in every other way indicating that these files are part of my
> app. Yet when some other routine calls one of these, the app
> generates a SIGABRT because it can't find the symbol.
>
Try turning off ZeroLink. If the symbols are truly not in the projec
then this will become a compile time bug not a runtime bug. When you get
the link error look at the name of the function it's expecting. If the
function name is mangled use c++filt from the terminal to demangle it.
> It happened first with some Apple sample code
> (OpenGL_Image_Loading.c); in frustration I got around that by cutting
> and pasting the code into one of my source files that XCode is willing
> to recognize. Now it's happening with another .c file that I just
> added to the project. All of the unrecognized code so far is in .c
> files, if that's a clue,
>
This happens when you include a C header from from a C++ header file. I
would try these things:
- put extern "C" { } around the function declaration
- put extern "C" { } aorund the function definition
- tell XCode to compile all files as C++ ("compile source as")
good luck
_______________________________________________
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