December 07, 2009

A subtle source of linker errors under XCode



If one source file is sourcecode.c.objc and another is sourcecode.cpp.objcpp, you will have problems if you try to call function defined in one file from the other. The resolve this either make them the same source type, or follow this guide.



This drove me nutty because the template I was working off has code set to sourcecode.cpp.objcpp, but XCode adds new classes as sourcecode.c.objc! To check the file type, use "Get Info" in the source file's context menu.



Cheers,

Steve