Hello Marco,

You have to make sure it's building as C and not C++. This suggests
you might have your project set to build everything as C++. In my
case, I made a new subproject for Sqlite that builts it into a Lib.
Then I set the build dependencies so the lib is used automatically at
link time.




Friday, March 30, 2012, 8:32:55 AM, you wrote:

MB> Please note that if I use the same compiler to compile sqlite3.c
MB> as a single c file than everything is compiled without errors.
MB> Errors occurs only when sqlite3.c is part of a c++ project.

MB> I also manually set sqlite3.c to be compiled as C file instead of Default 
without any luck.
MB> Seems like something confuse the Visual C++ compiler.

MB> Any idea?
MB> --
MB> Marco Bambini
MB> http://www.sqlabs.com








MB> On Mar 30, 2012, at 1:08 PM, Nick Shaw wrote:

>> -----Original Message-----
>>> I am trying to compile the latest sqlite 3.7.11 amalgamation C file within 
>>> a Visual Studio 2008 Express C++ project.
>>> sqlite3.c is correctly set as to be compiled as C code but I am unable to 
>>> find out a way to fix some compilation errors:
>>> 
>>> Compiling...
>>> sqlite3.c
>>> ..\Sources\sqlite3.c(107831) : error C2143: syntax error : missing ':' 
>>> before '!'
>>> ..\Sources\sqlite3.c(107831) : error C2059: syntax error : ';'
>>> ..\Sources\sqlite3.c(107832) : error C2059: syntax error : '}'
>>> ..\Sources\sqlite3.c(107994) : error C2079: 'yy318' uses undefined struct 
>>> 'LikeOp'
>>> ..\Sources\sqlite3.c(110530) : error C2224: left of '.eOperator' must have 
>>> struct/union type
>>> ..\Sources\sqlite3.c(110530) : error C2059: syntax error : '!'
>>> ..\Sources\sqlite3.c(110534) : error C2224: left of '.eOperator' must have 
>>> struct/union type
>>> ..\Sources\sqlite3.c(110534) : error C2059: syntax error : '!'
>>> ..\Sources\sqlite3.c(110538) : error C2275: 'ExprList' : illegal use of 
>>> this type as an expression
>>>        ..\Sources\sqlite3.c(8133) : see declaration of 'ExprList'
>>> ..\Sources\sqlite3.c(110541) : error C2224: left of '.eOperator' must have 
>>> struct/union type
>>> ..\Sources\sqlite3.c(110541) : error C2198: 'sqlite3ExprFunction' : too few 
>>> arguments for call
>>> ..\Sources\sqlite3.c(110542) : error C2059: syntax error : '!'
>>> ..\Sources\sqlite3.c(110554) : error C2224: left of '.eOperator' must have 
>>> struct/union type
>>> ..\Sources\sqlite3.c(110554) : error C2198: 'sqlite3ExprFunction' : too few 
>>> arguments for call
>>> ..\Sources\sqlite3.c(110555) : error C2059: syntax error : '!'
>> 
>> Looks like something's not right with the definition of the LikeOp struct in 
>> your copy of the file.  I've got the exact same amalgamation in my VS2008 
>> project and it builds fine.  Can you check what you have for the LikeOp 
>> structure definition?  Mine looks like this, and starts on line 107829:
>> 
>> struct LikeOp {
>>  Token eOperator;  /* "like" or "glob" or "regexp" */
>>  int not;         /* True if the NOT keyword is present */
>> };
>> 
>> 
>> Thanks,
>> Nick.
>> -- 
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

MB> _______________________________________________
MB> sqlite-users mailing list
MB> sqlite-users@sqlite.org
MB> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users




-- 
Best regards,
 Teg                            mailto:t...@djii.com

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to