Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlite3.c:375:21: error: expected value in expression #if SQLITE_HAS_CODEC #19

Closed
iamcxl369 opened this issue Dec 11, 2017 · 2 comments
Closed

Comments

@iamcxl369
Copy link

iamcxl369 commented Dec 11, 2017

I got some error after define the SQLITE_HAS_CODEC

sqlite3.c:375:21: error: expected value in expression
#if SQLITE_HAS_CODEC
#if SQLITE_HAS_CODEC should change to #if defined(SQLITE_HAS_CODEC)
@utelle
Copy link
Owner

utelle commented Dec 11, 2017

Thanks for reporting. Interestingly, I don't get even a warning when I compile SQLite with Visual C++. Otherwise I would certainly have detected the issue myself.

Obviously the SQLite project checks inconsistently for an enabled encryption option (SQLITE_HAS_CODEC) - in file sqlite.c I found 23 times #ifdef SQLITE_HAS_CODEC, but also 5 times #if SQLITE_HAS_CODEC.

I will not start to manually adjust the SQLite source code. Therefore I will change the preprocessor symbol definition to SQLITE_HAS_CODEC=1 to overcome the issue.

@utelle
Copy link
Owner

utelle commented Dec 11, 2017

The build files coming with wxSQLite3 have been adjusted to use the symbol definition SQLITE_HAS_CODEC=1.

I reported the inconsistent use of the symbol in the SQLite source code on the SQLite mailing list, but I don't know if and when the SQLite code will be adjusted. Therefore I recommend to use the above shown symbol definition in own projects to avoid problems.

@utelle utelle closed this as completed Dec 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants