I'm developing a large application consisting of both C,C++ and Objective-C++ sources. To help with debugging, all logging to the console is handled by a very simple utility file:
Logging.h:
extern void WriteToLog(const char *pString);
Logging.c:
#include "Logging.h"
void WriteToLog(const char *pString) {
puts(pString);
}
This works fine in the development build, but when I try a release-build with XCode 2.2 (GCC 4.0), I get this error:
Undefined symbols:
WriteToLog(char const *)
_writeToLog
collect2: Id returned 1 exit status
I've done some googling and have checked that the source is included in the target and 'build phase'. I've tried a Clean All. Logging.h is #imported into about a dozen separate source files. Any suggestions? This is driving me nuts, and works fine in other compliers.