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

makefile 编译问题 #5

Closed
CBHXuTT opened this issue Nov 18, 2020 · 1 comment
Closed

makefile 编译问题 #5

CBHXuTT opened this issue Nov 18, 2020 · 1 comment

Comments

@CBHXuTT
Copy link

CBHXuTT commented Nov 18, 2020

我在Windows下的Linux子系统中测试的,出现如下问题:
1.编译sqlite3,打开fts5,使用了c函数log,所以需要链接math库

gcc -lm build/sqlite3.c build/shell.c -ldl -lpthread -o sqlite3-shell -DSQLITE_DEBUG -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_EXPLAIN_COMMENTS -DSQLITE_ENABLE_SELECTTRACE -DSQLITE_ENABLE_WHERETRACE
/usr/bin/ld: cannot find -lmath
collect2: error: ld returned 1 exit status
Makefile:52: recipe for target 'sqlite3-shell' failed
make: *** [sqlite3-shell] Error 1

所以makefile文件中LIB需要引入math,LIB = -ldl -lpthread -lm
2.测试sql文件中加载动态库需要改成.load ./libsimple,不然无法加载

@wangfenjin
Copy link
Owner

已修复

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

2 participants