报错提示:
C:/PROGRA2/MINGW-1/I686-8~1.0-P/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.1.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lsqlite3
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe[3]: *** [CMakeFiles\c_sqlJap.dir\build.make:94: c_sqlJap.exe] Error 1
mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:82: CMakeFiles/c_sqlJap.dir/all] Error 2
mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:89: CMakeFiles/c_sqlJap.dir/rule] Error 2
mingw32-make.exe: *** [Makefile:123: c_sqlJap] Error 2
我在官网上下了SQLite3.h , sqlite3.dll
并且放到了运行库下,
你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答
本次提问扣除的有问必答次数,将会以问答VIP体验卡(1次有问必答机会、商城购买实体图书享受95折优惠)的形式为您补发到账户。
因为有问必答VIP体验卡有效期仅有1天,您在需要使用的时候【私信】联系我,我会为您补发。
我現在知道了,就是在
g++ main.cpp sqlite3.dll -o a.exe
這樣就可以了。
add_library(common STATIC sqlite3.c)
add_executable(dllTry main.cpp a.h a.cpp sqlite3.h sqlite3.c)