Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS加载动态库的问题 #134

Open
yhcflyy opened this issue Sep 22, 2023 · 7 comments
Open

iOS加载动态库的问题 #134

yhcflyy opened this issue Sep 22, 2023 · 7 comments

Comments

@yhcflyy
Copy link

yhcflyy commented Sep 22, 2023

你好,我这边想问个问题。由于iOS不支持动态加载动态库,您这个分词插件能否直接编译到sqlite中默认开启分词功能,这样就不需要动态加载库文件

@wangfenjin
Copy link
Owner

readme里面有iOS的例子

@yhcflyy
Copy link
Author

yhcflyy commented Sep 22, 2023

readme里面有iOS的例子

这个我知道,我仔细研究过。我这边想通过flutter的ffi将他做成插件,但是发现调用C的sqlite3_load_extension的时候他会自动在.a库后面追加.dylib后缀导致加载库失败。而且iOS也不支持动态加载库。
企业微信截图_d85ef8d0-e0ff-4c20-85eb-5e711e33d824

@wangfenjin
Copy link
Owner

什么意思?readme里面的例子不能用吗

@wangfenjin
Copy link
Owner

是可以把这个库打包到sqlite的,具体需要你自己调研

@wangfenjin
Copy link
Owner

wangfenjin commented Sep 22, 2023

但是我认为不存在你说的不能用的问题,因为好几个例子啊

@yhcflyy
Copy link
Author

yhcflyy commented Sep 22, 2023

WechatIMG1
我在dart中用另一种方法加载试了一下,确定在Flutter的移动端是不支持加载.a静态库的。我看了flutter插件sqlite3,里面的测试用例也只有桌面端能加载扩展库
image
所以我现在也基本确定只有定制sqlite,将分词功能编译到sqlite库中类似于sqlite3/spellfix1才能在移动端端flutter中使用分词

@springrain
Copy link

@yhcflyy 大佬,你把这个程序和SQLite一起编译成功没? Go程序加载动态链接库在跨平台编译也有很多问题呀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants