加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

SQLite学习(一) - VS2008编译SQLite3070602

发布时间:2020-12-12 20:15:56 所属栏目:百科 来源:网络整理
导读:使用SQLite版本sqlite-3070602. 下载已经预编译处理过的版本sqlite-preprocessed-3071100.zip,导入.h,.c文件,直接编译会有一些错误,做如下改动就能编译通过 1. 移除tclsqlite.c, tclsqlite.c用于生成基于TCL的API,如果需要编译,则需要另外下载tcl.h头文

使用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 MSDN
http://msdn.microsoft.com/en-us/library/d91k01sh%28VS.80%29.aspxor google "MSDN def"

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读