编译文件按步骤:
qmake -project
qmake
make
进行的,前两步没有问题,make的时候出现错误,另外已安装了libsqlite3-dev
错误代码:
/mnt/hgfs/student/qt1.cpp:109: undefined reference to `sqlite3_get_table'
/mnt/hgfs/student/qt1.cpp:115: undefined reference to `sqlite3_free_table'
/mnt/hgfs/student/qt1.cpp:123: undefined reference to `sqlite3_free_table'
/mnt/hgfs/student/qt1.cpp:133: undefined reference to `sqlite3_get_table'
/mnt/hgfs/student/qt1.cpp:140: undefined reference to `sqlite3_free_table'
/mnt/hgfs/student/qt1.cpp:162: undefined reference to `sqlite3_free_table'
------解决方案--------------------
更改生成的Makefile的文件,生成目标文件的那一行代码最后加上链接动态库,比如-lsqlite3