I'm trying to compile this sample code with XCode 4.2b, here's how my project looks like:
Application type: Command Line Tool. When I'm trying to build the project, I get the following list of errors:
I suppose that I haven't added some frameworks to the project, though I don't know what frameworks should be added...
The imported files probably contain Objective C code, but you're using the C compiler.
Change the file extension of main.c
to main.m
.