SQLite User Forum

Current Head of Trunk MSVC Compiler barf
Login

Current Head of Trunk MSVC Compiler barf

(1) By Keith Medcalf (kmedcalf) on 2023-01-11 20:45:49 [source]

MSVC does not like btreeint.h and needs the following patch:

Index: src/btreeInt.h
==================================================================
--- src/btreeInt.h
+++ src/btreeInt.h
@@ -696,11 +696,11 @@
   Pager *pPager;    /* The associated pager.  Also accessible by pBt->pPager */
   u8 *aPgRef;       /* 1 bit per page in the db (see above) */
   Pgno nPage;       /* Number of pages in the database */
   int mxErr;        /* Stop accumulating errors when this reaches zero */
   int nErr;         /* Number of messages written to zErrMsg so far */
-  int rc;;          /* SQLITE_OK, SQLITE_NOMEM, or SQLITE_INTERRUPT */
+  int rc;           /* SQLITE_OK, SQLITE_NOMEM, or SQLITE_INTERRUPT */
   u32 nStep;        /* Number of steps into the integrity_check process */
   const char *zPfx; /* Error message prefix */
   Pgno v1;          /* Value for first %u substitution in zPfx */
   int v2;           /* Value for second %d substitution in zPfx */
   StrAccum errMsg;  /* Accumulate the error message text here */

MSVC apparently cannot deal with an empty statement inside a struct ...