OP-Engineering/op-sqlite

Trying to use this library with Sqlite.swift

Closed this issue · 4 comments

Hi,

When I try to build this library with sqlite.swift

It fails on ci, with a bunch of errors on redefinition of sqlite3

fix error: redefinition of 'sqlite3_mutex_methods'

I have updated to the latest version of both op-sqlite and sqlite.swift
and added the following to my package.json
"op-sqlite": { "iosSqlite": false }

Any ideas on how to fix this issue would be appreciated. I really want the benefits of c++ op-sqlite
and the cleanliness of sqlite.swift in my ios modules

They are both trying to compile and import sqlite, you will have to figure out yourself how to exclude one from the compilation process, but I don't think it will be possible since both need to include the headers during compilation.

You should better ask in StackOverflow, nothing wrong with this library.

Thanks for quick response,

will post my findings if I do

Fixed
Someone in sqlite.dart had similar issue and fixed it by installing sqlite.swift as a standalone version sqlite dart

I updated my podfile in a similar fashion and it seems to fix the issue
`
pod 'SQLite.swift/standalone', '~> 0.15.3'

pod 'sqlite3', :modular_headers => true
`

Nice!