青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

牽著老婆滿街逛

嚴(yán)以律己,寬以待人. 三思而后行.
GMail/GTalk: yanglinbo#google.com;
MSN/Email: tx7do#yahoo.com.cn;
QQ: 3 0 3 3 9 6 9 2 0 .

Accessing SQLite databases in C++ using SOCI

轉(zhuǎn)載自:http://jameswynn.com/2009/10/accessing-sqlite-databases-in-c-using-soci/

I recently decided to use SOCI and SQLite at work and found that neither there is not a super straight forward path for setting this up. As of SOCI version 3.0.0 there is no support for Visual Studio 2008, so I had to convert and fix a few bugs resulting from that. There were some path issues as well. Also they don't package the SQLite interface with SOCI so you have to checkout the repo to get access to it. After getting that there are still a few snags, not to mention actually setting up SQLite as a library.

[Updated: 10/13/2009]
After writing this article the SOCI team has resolved some of these issues, so some of these steps are no longer necessary.

Step 1: Setup SQLite

Step 1.1

Download the SQLite 3.6.18 source and library files.

Step 1.2:

Unarchive the SQLite archives into a directory, mine will be c:\usr\sqlite3

Step 1.3:

Create the sqlite3.lib file by using Visual Studio's lib command:

LIB /DEF:sqlite3.def


Step 2: Setup SOCI

Step 2.1:

Download the head of SOCI's git repository

Step 2.2:

Decompress the file into another directory, mine will be c:\usr\soci

Step 2.3:

Soci requires stdint.h but Visual Studio 2008 does not provide it, so simply download pstdint.h and rename it to stdint.h in the soci\src\core directory.

Step 2.4:

Open the directory soci\build and copy msvc80 to msvc90.

Now open the msvc90\dll directory.

Through Visual Studio 2008, open the soci_dll.sln file and allow it to convert it with the default parameters.

Step 2.5: Build SOCI's Core and SQLite3

SOCI's core project should build without errors, but the sqlite project will have several.

Step 2.6: Fixing Build Errors

Now SOCI's core project should build without errors, but the sqlite3 project will definitely fail. It will give two specific errors:

fatal error C1083: Cannot open include file: 'sqlite3.h': No such file or directory

and

error C3163: '_vsnprintf': attributes inconsistent with previous declaration

Both are relatively easy to fix.

Step 2.6.1: Fixing SQLite3 include paths

In Visual Studio, navigate to View->Property Manager, then in the pane that shows up, expand the sqlite3 project, then expand "Debug | Win32" then "soci_dll" then double-click on the "soci" object. Select "User Macros" on the sheet you find there.

Find SQLITE3_INCLUDE_DIR and SQLITE_LIB_DIR and change them to the directory created earlier, "c:\usr\sqlite3"

Step 2.6.2: Fixing _vsnprintf

[Update 10/13/2009]
This step is no longer needed.

Expand the core project and look for soci-platform.h and find a line that says "HAVE_VSNPRINTF"

This is redefining something that VS2008 provides already and confuses the hell out of the compiler. Just comment it out, or change it to look like:

// Define if you have the vsnprintf variants.
#if _MSC_VER < 1500
#    define HAVE_VSNPRINTF 
1
#    define vsnprintf _vsnprintf
#endif

Step 2.7 Building SOCI's sqlite3_test project

This project will be riddled with errors unless you have boost installed. I personally don't use it, so had to comment out large chunks of common-tests.h.  Specifically, comment out the area at the top where it includes the boost headers. Also comment out the contents of test26, test28 and test30.

Also add this line at the bottom of soci-platform.h:

#undef SOCI_USE_BOOST

 

Finished

Now you should have a working copy of SOCI 3.0.0 with SQLite3 support in Visual Studio 2008. Congratulations!


posted on 2009-11-27 13:47 楊粼波 閱讀(1649) 評(píng)論(0)  編輯 收藏 引用


只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            午夜精品99久久免费| 久久一二三四| 99热在线精品观看| 欧美视频在线播放| 欧美亚洲一级片| 香蕉久久精品日日躁夜夜躁| 国产亚洲成av人在线观看导航| 久久成人免费| 久久久久国产精品一区| 亚洲区免费影片| 99国产精品久久久久久久成人热| 国产精品高潮视频| 久久精品视频在线| 欧美国产视频日韩| 亚洲欧美精品一区| 久久精品国产清高在天天线 | 欧美一级网站| 狠狠做深爱婷婷久久综合一区| 另类国产ts人妖高潮视频| 免费成人你懂的| 亚洲欧美日韩人成在线播放| 欧美夜福利tv在线| 亚洲精品乱码久久久久久日本蜜臀 | 国内精品久久久久久久影视蜜臀 | 亚洲激情网站免费观看| 欧美日韩国产一区| 久久国产精品电影| 欧美国产一区在线| 欧美一区二区三区四区夜夜大片| 久久久水蜜桃| 亚洲资源av| 老牛影视一区二区三区| 亚洲欧美日韩国产精品| 久久久久久香蕉网| 午夜视频在线观看一区二区三区| 久久综合图片| 欧美在线观看一区二区| 欧美高清视频在线播放| 欧美中文在线观看| 欧美日韩国产区一| 狼人天天伊人久久| 国产欧美 在线欧美| 亚洲青涩在线| 在线视频成人| 亚洲欧美在线免费| 一区二区三欧美| 麻豆精品91| 久久九九精品| 国产精品视频福利| av不卡在线| 日韩午夜在线观看视频| 久久综合狠狠| 久久亚洲图片| 国产亚洲精品久| 亚洲综合第一页| 亚洲一区二区影院| 欧美日韩视频一区二区| 亚洲国产精品成人一区二区| 在线观看欧美一区| 久久久久久久国产| 久久国产一二区| 国产日韩欧美黄色| 亚洲综合成人在线| 欧美一区二区三区免费视| 国产精品久久久久久久第一福利| 亚洲精品视频一区| 一区二区三区高清在线观看| 欧美激情精品久久久| 亚洲国产精品欧美一二99| 在线成人中文字幕| 美女精品在线观看| 亚洲国产国产亚洲一二三| 亚洲欧洲日韩在线| 欧美成人日韩| 日韩一级黄色av| 午夜精品久久久久久久久久久| 国产精品成人一区二区网站软件 | 国产精品一区二区三区成人| 亚洲伊人第一页| 久久精品视频在线| 国内揄拍国内精品久久 | 亚洲国产一区二区三区在线播| 亚洲黄一区二区| 欧美日韩国产a| 亚洲影院一区| 久久久综合香蕉尹人综合网| 国外精品视频| 欧美freesex8一10精品| 99在线热播精品免费| 翔田千里一区二区| 一区在线观看| 欧美国产丝袜视频| 亚洲小视频在线观看| 久久精品成人一区二区三区| 永久免费精品影视网站| 欧美激情综合在线| 亚洲一区在线观看免费观看电影高清| 久久av资源网| 亚洲精品裸体| 国产精品中文字幕欧美| 久久天堂国产精品| 一本色道久久88综合日韩精品| 久久精品国产视频| 亚洲三级国产| 国产日韩欧美高清免费| 欧美国产日韩一区二区| 午夜精品福利一区二区三区av| 女人色偷偷aa久久天堂| 亚洲系列中文字幕| 亚洲福利视频在线| 国产伦精品一区二区三区四区免费| 久久久青草青青国产亚洲免观| 亚洲精品免费在线| 久久午夜电影网| 亚洲欧美日本国产专区一区| 亚洲高清一二三区| 国产精品婷婷| 欧美久久久久免费| 久久琪琪电影院| 午夜国产一区| 一本色道久久加勒比精品| 免费看成人av| 久久久91精品国产一区二区精品| 一本久久综合| 亚洲欧洲在线一区| 激情婷婷久久| 国产综合色产| 国产精品亚洲美女av网站| 欧美日韩国产精品| 欧美好骚综合网| 久久在线免费观看视频| 久久精品国产2020观看福利| 亚洲欧美激情视频| 夜夜嗨一区二区三区| 91久久精品国产91性色| 欧美黄色精品| 亚洲第一网站免费视频| 欧美成人免费观看| 久久久午夜视频| 欧美一级大片在线观看| 亚洲一区二区三区激情| 日韩一二在线观看| 亚洲麻豆一区| 日韩视频免费| 99国产精品视频免费观看| 最新亚洲激情| 亚洲精品中文字| 亚洲作爱视频| 中文欧美在线视频| 亚洲一品av免费观看| 亚洲免费一在线| 亚洲调教视频在线观看| 亚洲伊人一本大道中文字幕| 亚洲自拍偷拍麻豆| 亚洲你懂的在线视频| 亚洲在线免费观看| 亚洲欧美色婷婷| 欧美在线欧美在线| 久久嫩草精品久久久精品一| 久久乐国产精品| 欧美电影免费观看高清| 亚洲高清资源| 亚洲一级免费视频| 欧美一区二区三区四区高清| 久久精品国产免费看久久精品| 久久天天狠狠| 欧美日本久久| 国产精品一区二区女厕厕| 一区二区三区在线高清| 亚洲国产一区在线观看| 亚洲午夜黄色| 久久精品国产69国产精品亚洲| 久久五月天婷婷| 亚洲精品免费看| 亚洲综合国产激情另类一区| 久久精品卡一| 欧美日韩高清在线播放| 国产一区二区三区免费不卡| 亚洲精品日韩在线| 篠田优中文在线播放第一区| 可以免费看不卡的av网站| 亚洲人永久免费| 欧美一级久久| 欧美视频一区二区三区在线观看| 国产日韩欧美一区二区| 亚洲精品社区| 欧美在线地址| 99re6这里只有精品| 欧美一区二区三区在| 欧美日本韩国一区二区三区| 国产日韩欧美黄色| 一区二区三区不卡视频在线观看| 久久久久久电影| 中文精品视频| 欧美精品乱人伦久久久久久| 国产综合久久| 亚洲欧美日韩国产一区| 亚洲第一中文字幕| 久久精品亚洲精品国产欧美kt∨| 欧美视频你懂的|