2)选择win32 project模板;
3)选择工程类型(编译目标类型)为win32 dll。
*如果要创建静态库,则创建 一个win32 consoleapplication,并将编译类型选为“static library”。
*注意需要将tcl sqlite.c和shell.c、icu.c去掉。其中tcl sqlite.c用于 生成基于tcl的api,如果要编译,这需要另外下载tcl.h;shell.c用于 生成命令行模式的 sqlite.exe,如果是静态库形式则可以选择;icu是
internationalcomponents forunicode,如果需要则需另外下载相关头文件。
5)选择合适的runtimelibrary, 默认为多线程模式。位置:project->properties->con figurationproperties->c/c++->code generation->runtime library
6)将编译模式改为c模式(tc)。位置:project->properties->con figurationproperties->c/c++->advanced->compile as
7)如果想要取得不必要的警告信息,则作如下处理:
-在预处理定义处加 _crt_secure_no_warnings
位置: project->properties->con figurationproperties->c/c++->preprocessor->preprocessorde Finitions
- disable制定的警告信息(project->properties->c/c++->advanced->disablespecific warnings): 4267;4244;4018;4311;4996;4312;4311
8)为避免如下警告(以及相关错误)
warning c4013:‘tryentercriticalsection’ undefined; assuming extern returningint
在os.h的第72行,#include之前加:
#define _win32_winnt0x0400 #definewin32_lean_and_mean
9)ok,编译,即可成功!
|
|
原文地址 http://blog.sina.com.cn/s/blog_41678ec301000bck.html |
原文地址:https://www.jb51.cc/sqlite/203209.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。