使用sqlite版本sqlite-3070602. 下载已经预编译处理过的版本sqlite-preprocessed-3071100.zip,导入.h,.c文件,直接编译会有一些错误,做如下改动就能编译通过
1. 移除tclsqlite.c, tclsqlite.c用于生成基于TCL的API,如果需要编译,则需要另外下载tcl.h头文件;
2. fts3*.c是全文索引的模块;
打开菜单->Project->Settings->C/C++ -> Preprocessor deFinitions,添加如下4个编译选项
sqlITE_CORE
sqlITE_ENABLE_RTREE
sqlITE_ENABLE_ColUMN_MetaDATA
sqlITE_ENABLE_FTS3
3. rTree.h是建立数据库R树索引的模块的头文件,不知什么原因代码里include的是sqlite3rtree.h,改成rtree.h
4. shell.c用于生成命令行模式的sqlite.exe;
##################################
sqlite liB,DLL
1. download header files,lib files and dll files
We need following files
sqlite3.h
sqlite3ext.h
sqlite3.def
sqlite3.dll
convert the def file to lib file
C:/>liB /DEF:sqlite3.def /machine:IX86
liB.exe: The Microsoft library Manager (liB.exe)
It creates and manages a library of Common Object file Format (COFF) object files. liB can also be used to create export files and import librarIEs to reference exported deFinitions.
def file: A module-deFinition (.def) file is a text file containing one or more module statements that describe varIoUs attributes of a DLL. If you are not using the __declspec(dllexport) keyword to export the DLL's functions,the DLL requires a .def file. A minimal .def file must contain the following module-deFinition statements:liBRARY and EXPORTS. More details please refer to MSDNhttp://msdn.microsoft.com/en-us/library/d91k01sh%28VS.80%29.aspxor Google "MSDN def"
以上是内存溢出为你收集整理的SQLite学习(一) - VS2008编译SQLite3070602全部内容,希望文章能够帮你解决SQLite学习(一) - VS2008编译SQLite3070602所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)