error: expected expression before '/' token
I'm no C expert, and am getting this error when trying to cross-compile a C application:
src/ls_sqlite3.c:522: error: 开发者_开发技巧expected expression before '/' token
The offending line is this:
sqlite3_busy_timeout(conn, lua_tonumber(L,3)); // TODO: remove this
I suspect the use of // for comments is not allowed by certain compilers or through some settings, but Google didn't help. Does someone know?
Thank you.
In the old C standard only allowed comments are /*...*/
. Only from C99 standards onwards //
are allowed as comments.
Since you didn't mention your compiler. You could change it to c-style comments
sqlite3_busy_timeout(conn, lua_tonumber(L,3)); /* TODO: remove this */
Check your compilers manual for a compatibility switch for c++ style comments.
精彩评论