SQLite Forum

Build Error: sqlite3.c(206932): error C2061: syntax error: identifier 'sqlite3_session'
Login
Ok.  Figured it out.  It is because "config.h" is now being loaded *after* a bunch of other headers.  If I add the block to include config.h to the top of sqlite3.c then it works.

Note -- this is because I put all the configuration options in config.h which also includes the all the sqlite configuration defines.  This works for both MSVC and GCC ...

Previously, this was the first loaded header.  Now it is not.  The following fixes it by making sure it is the first header loaded:

```
Index: tool/mksqlite3c.tcl
==================================================================
--- tool/mksqlite3c.tcl
+++ tool/mksqlite3c.tcl
@@ -78,22 +78,25 @@
 ** if you want a wrapper to interface SQLite with your choice of programming
 ** language. The code for the "sqlite3" command-line shell is also in a
 ** separate file. This file contains only code for the core SQLite library.
 */
 #define SQLITE_CORE 1
-#define SQLITE_AMALGAMATION 1}]
+#define SQLITE_AMALGAMATION 1
+#if defined(_HAVE_SQLITE_CONFIG_H) && !defined(SQLITECONFIG_H)
+#include "config.h"
+#define SQLITECONFIG_H 1
+#endif}]
 if {$addstatic} {
   puts $out \
 {#ifndef SQLITE_PRIVATE
 # define SQLITE_PRIVATE static
 #endif}
 }
```