ls /usr/local/lib/libsqlite3.* /usr/local/lib/libsqlite3.a /usr/local/lib/libsqlite3.so.0 /usr/local/lib/libsqlite3.la /usr/local/lib/libsqlite3.so.0.8.6 /usr/local/lib/libsqlite3.so ls /usr/local/include/sqlite3.h /usr/local/include/sqlite3.h arm-linux-gcc -L./lib-lsqlite3 -o sqlite sqlite.c /tmp/ccKtSnwq.o: In function `main': sqlite.c:(.text+0xf4): undefined reference to `sqlite3_open' sqlite.c:(.text+0x120): undefined reference to `sqlite3_errmsg' sqlite.c:(.text+0x140): undefined reference to `sqlite3_close' sqlite.c:(.text+0x170): undefined reference to `sqlite3_exec' sqlite.c:(.text+0x1b0): undefined reference to `sqlite3_free' sqlite.c:(.text+0x1d8): undefined reference to `sqlite3_exec' sqlite.c:(.text+0x218): undefined reference to `sqlite3_free' sqlite.c:(.text+0x240): undefined reference to `sqlite3_exec' sqlite.c:(.text+0x280): undefined reference to `sqlite3_free' sqlite.c:(.text+0x28c): undefined reference to `sqlite3_close' collect2: ld returned 1 exit status [root@localhost install]# arm-linux-gcc -o sqlite sqlite.c -L./usr/local/lib -lsqlite3 /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lsqlite3 collect2: ld returned 1 exit status [root@localhost install]# arm-linux-gcc -o sqlite sqlite.c -L./usr/local/lib -lsqlite3 -static /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lsqlite3 collect2: ld returned 1 exit status [root@localhost install]# chmod +x /usr/local/libsqlite3.so chmod: cannot access `/usr/local/libsqlite3.so': No such file or directory [root@localhost install]# chmod +x /usr/local/libsqlite3.so.0.8.6 chmod: cannot access `/usr/local/libsqlite3.so.0.8.6': No such file or directory [root@localhost install]# arm-linux-gcc -o sqlite sqlite.c -L./usr/local/lib -lsqlite3.so -static /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lsqlite3.so collect2: ld returned 1 exit status [root@localhost install]# arm-linux-gcc -o sqlite sqlite.c -L./usr/local/lib -lsqlite3.so /opt/FriendlyARM/toolschain/4.5.1/lib/gcc/arm-none-linux-gnueabi/4.5.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lsqlite3.so collect2: ld returned 1 exit status
时间: 2023-08-26 17:04:31 浏览: 221
Linux安装python3.7/3.9.tgz
这是一个关于使用arm-linux-gcc编译sqlite程序的错误信息。看起来是无法找到libsqlite3.so文件,导致编译失败。你需要确保在编译过程中,libsqlite3.so文件已经被正确安装并且所在路径被正确配置。你可以尝试使用命令ldconfig更新动态链接库缓存,并且在编译命令中使用正确的-lsqlite3参数来指定库文件路径。
阅读全文