Appropriate settings for a file in Xcode

Hi, ALL,

I did successfully create a project for Cocoa Bundle for my C++ application in Xcode.

However the project is using the SQLite library and so I add the SQLite sources into the project and compiled it.


The compilation went thru fine, however when Xcode tried to compile the SQLite source code (.c file) it gsve a lot of warnings.

I asked on the SQLite ML, and was told that the compilation should succeed and that I should set the file type inside the Xcode to be C and that I should get only very little number (like 2-3).


I did that and re-compile, but that didn't get rid of the warnings.


Is there something I'm missing? I did see that there is a "C Language" option in the Xcode "Build Options" tab in the project. And I guess I should change it. But will it get rid of all those warnings?

Or maybe I need something else?


I'm using Xcode 5.1.1 on OSX 10.8.


Xcode is set for the file to be C - http://imgur.com/eWFzm9B.

Warnings when compiling sqlite3.c code - http://imgur.com/H8CQBX9.


Thank you.

You don't need to compile SQLite. The library is already in the OS, so you just need to link against it. Go into the target settings in Xcode, go to Build Phases, open up the libraries box, press the + button and look for "libsqlite3.dylib".


If you do want to build it yourself, just ignore the warnings. The SQLite developers don't pay attention to compiler warnings; they have other techniques to test the code to assure quality. But there's really no reason to build it, as I said.

Appropriate settings for a file in Xcode
 
 
Q