That problem arises when inserting sqlite amalgamation (C) into
an wxWidget project (C++).
The latter has project wide PCH usage and this doesn't work for
the sqlite code.
I meanwhile tried to disable PCH usage in the advanced properties
of sqlite.c, adding -DNOPCH to
$compiler $options $includes -c $file -o $object
But no effect, it still uses pch.
The command line is like this
gcc.exe -DNOPCH -Wall -pipe -mthreads -Winvalid-pch -include wx_pch.h -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP -g -ID:\develop\wxWidgets\include -ID:\develop\wxWidgets\lib\gcc_dll\mswu -c D:\develop\sqlite-amalgamation-3310100\sqlite3.c -o obj\Debug\sqlite-amalgamation-3310100\sqlite3.o
What I think is the proper long term fix for this problem.
Git patch attached
--- a/src/plugins/scriptedwizard/resources/wxwidgets/pch/wx_pch.h
+++ b/src/plugins/scriptedwizard/resources/wxwidgets/pch/wx_pch.h
@@ -10,7 +10,9 @@
#ifndef WX_PCH_H_INCLUDED
#define WX_PCH_H_INCLUDED
-// basic wxWidgets headers
+#ifdef __cplusplus
+
+// basic wxWidgets C++ headers
#include <wx/wxprec.h>
#ifdef __BORLANDC__
@@ -25,4 +27,6 @@
// put here all your rarely-changing header files
#endif // WX_PRECOMP
+#endif // __cplusplus
+
#endif // WX_PCH_H_INCLUDED
--
Tim S.