sqlite3.c(45519,12): error C2065: 'rc': undeclared identifier
(1) By Aron Bierbaum (aronbierbuam) on 2022-09-10 14:23:55 [link] [source]
Attempting to build Python 3.11 with SQLite 3.39.3 results in the following error.
sqlite3.c(45519,12): error C2065: 'rc': undeclared identifier
I tracked it down to the following change in os_win.c
when SQLITE_OMIT_AUTOINIT
is defined in the Python build.
I think this can be fixed by the following change:
#ifndef SQLITE_OMIT_AUTOINIT
int rc = sqlite3_initialize();
if( rc ) return rc;
+#else
+ int rc = SQLITE_OK;
#endif
sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_TEMPDIR));
if( type==SQLITE_WIN32_DATA_DIRECTORY_TYPE ){
(2.1) By Chris Locke (chrisjlocke1) on 2022-09-10 14:39:18 edited from 2.0 in reply to 1 [source]
See this post.
https://sqlite.org/forum/forumpost/d23c12806b46de91ad1b5b38c81d312360e7af18b6d67666319d35fb7217dc53
"Check-in f74a5ea8c986dc33 on the SQLite trunk branch fixes this issue. It is simple to fix this by patching the sqlite3.c file directly. We are not planning to issue a new 3.39.4 release to address this problem, since SQLITE_OMIT_AUTOINIT is an unsupported compile-time option." - Richard
(3) By Aron Bierbaum (aronbierbuam) on 2022-09-10 14:39:21 in reply to 2.0 [link] [source]
Thanks! Sorry for raising an already posted issue.
(4) By Chris Locke (chrisjlocke1) on 2022-09-10 15:25:18 in reply to 3 [link] [source]
Don't apologise! We only learn by asking. :)