I am trying to use sqlite3 on a program written by C++ 2003. I have downloaded sqlite-amalgamation-3360000.zip from download page and add sqlite3.h to header files, shell.c & sqlite3.c to resources file. then I write a simple code in test.cpp to test the connection:
#include "sqlite3.h"
#include <iostream>
int main()
{
sqlite3 *db;
sqlite3_open("test.sqlite", &db);
return 0;
}
however when I compiled it always show error: sqlite3.c(27474): error C2692: '_ReadWriteBarrier' : fully prototyped functions required in C compiler with the '/clr' option
I dont know what I did wrong. Please can someone help?
_ReadWriteBarrieris a compiler intrinsic function: the compiler is programmed to handle it specially. This is declared in theintrin.hheader file.From
sqlite3.c:Since you are compiling on an ancient version of MSVC, I suggest disabling this by defining the
SQLITE_DISABLE_INTRINSICpreprocessor symbol.