Closed bmwalters closed 4 years ago
When using SQLite.swift/standalone with sqlite3 pod version >= 3.30.0, attempting to build the project results in "ambiguous use" warning in Xcode pointing here.
SQLite.swift/standalone
sqlite3
SQLite 3.30.0 changed the definition of SQLITE_DETERMINISTIC:
-#define SQLITE_DETERMINISTIC 0x800 +#define SQLITE_DETERMINISTIC 0x000000800
Meaning that the (older) system sqlite3 library and the pod have different definitions, even though they're the same value.
We've been importing the system SQLite3 module in SQLiteObjc.h even when linking against standalone sqlite.
SQLiteObjc.h
I added a check to SQLiteObjc.h to import the sqlite3 pod when we're using it, instead of always importing the system module.
This leads to there being only one definition in scope.
Running into the same issue. Thank you for the solution!
Thanks, I've just run into this as well.
Problem
When using
SQLite.swift/standalone
withsqlite3
pod version >= 3.30.0, attempting to build the project results in "ambiguous use" warning in Xcode pointing here.Solution
SQLite 3.30.0 changed the definition of SQLITE_DETERMINISTIC:
Meaning that the (older) system sqlite3 library and the pod have different definitions, even though they're the same value.
We've been importing the system SQLite3 module in
SQLiteObjc.h
even when linking against standalone sqlite.I added a check to
SQLiteObjc.h
to import the sqlite3 pod when we're using it, instead of always importing the system module.This leads to there being only one definition in scope.