Hey, I'm encountering an issue with Xcode marking functions from a C codebase I imported as redefinitions even though they are not. I have searched the files and made sure they aren't using any default names that might not be allowed by the compiler.
Example:
int F_000TODO_EXEDEMO_RUN( void ){
printf( "[_HELLO_WORLD_]" );
fflush( stdout );
return( 0 );
}
error: /Users/[myName]/Developer/work projects/[Project]/[Project]/Algorithm/000TODO/000TODO.c:34:6 Redefinition of 'F_000TODO_EXEDEMO_RUN'
It is also worthy to mention that these errors only appear when I try to compile and when I go into the file to look at them they disappear...
Anyone have any idea what I should try before I use up one of my code level supports for this?
I’ve never seen a problem like this that wasn’t caused by folks defining the symbols twice. This is easy to do in C because of the textual nature of its header and macro models. A good way to debug these issues is to choose Product > Perform Action > Preprocess. That’ll show you the source code for a file after it’s been run through the preprocessor, which expands all the headers and macros.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"