Having both C and C++ files in XCode project failing -
I am trying to use information from the SQLite database in my C ++ project. I downloaded the sqlite amalgamation and added sqlite3.h and sqlite3.c to my project, and #include "sqlite3.h" Added precompiled header file.
However, Xcode no longer receives standard headers like algorithm , cassert , cfloat etc. The specific error is:
Lexical or preprocessor digit - 'algorithm' file not found If I remove two skeleton files from this project, then Headers can meet again. If I change the sqlite3.c file to .cpp file, then get the header again. Removing #include "sqlite3.h" does not change anything.
However, I can not leave it as a .cpp file because it returns because it is some things that are not compatible with C ++.
Is there a way to have both C and C ++ files in the same XCode project? (Or else another way to include the Sakleite Library?)
To work, attach me All had to do with my #include with a #ifdef __cplusplus and endif . I do not know all the mechanics behind it.
Comments
Post a Comment