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

牽著老婆滿街逛

嚴以律己,寬以待人. 三思而后行.
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

轉載自: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 楊粼波 閱讀(1645) 評論(0)  編輯 收藏 引用

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            久久婷婷国产综合国色天香| 国产日产欧美精品| 亚洲另类在线视频| 亚洲人午夜精品| 欧美激情一区| 亚洲国产精品专区久久| 亚洲激情午夜| 亚洲午夜视频| 欧美一二三区精品| 久久久久国色av免费看影院| 久久亚洲一区| 欧美日韩免费网站| 国产日韩成人精品| 狠狠88综合久久久久综合网| 国产精品啊啊啊| 精品1区2区| 日韩亚洲精品在线| 欧美一区二区三区免费视| 久久免费黄色| 亚洲人成网站999久久久综合| 亚洲精品日韩激情在线电影| 亚洲午夜视频在线| 久久婷婷国产综合国色天香| 欧美日韩国内| 激情成人亚洲| 亚洲欧美亚洲| 久久亚洲精品欧美| 亚洲视频网在线直播| 欧美一区二区视频观看视频| 欧美国产精品日韩| 国产一区二区剧情av在线| 亚洲国产一区在线| 午夜精品美女久久久久av福利| 免费不卡在线观看av| 宅男精品视频| 欧美精品久久久久久久久久| 国模叶桐国产精品一区| 蘑菇福利视频一区播放| 国产精品腿扒开做爽爽爽挤奶网站 | 含羞草久久爱69一区| 一个色综合导航| 美女精品自拍一二三四| 亚洲午夜精品17c| 欧美福利视频在线| 韩国一区二区三区美女美女秀| 亚洲专区一区| 亚洲免费观看| 欧美日韩高清一区| 亚洲国产一区二区精品专区| 久久久久久日产精品| 一道本一区二区| 欧美另类在线播放| 亚洲理论在线观看| 亚洲激情综合| 欧美国产精品人人做人人爱| 亚洲高清久久久| 免费亚洲电影在线观看| 久久久久一区二区三区| 精品不卡一区| 欧美成人性网| 欧美大片免费久久精品三p | 欧美xx69| 亚洲精选一区二区| 亚洲精品久久久久久久久| 欧美成人日韩| 亚洲理伦在线| 99re8这里有精品热视频免费| 欧美精品久久99| 在线视频你懂得一区二区三区| 亚洲国产成人精品久久| 欧美激情精品久久久久久蜜臀| 亚洲精品在线视频观看| 99视频精品| 国产手机视频一区二区| 久久亚洲精品网站| 久久亚洲国产精品一区二区 | 91久久精品久久国产性色也91 | 国产精品丝袜91| 影音先锋久久精品| 午夜精品成人在线| 亚洲综合电影| 国产亚洲激情在线| 久久综合激情| 女人色偷偷aa久久天堂| 日韩视频精品| 亚洲一区二区三| 激情综合在线| 亚洲伦理精品| 国产日本欧美一区二区三区| 麻豆91精品| 欧美日韩视频在线第一区| 先锋影音久久| 另类亚洲自拍| 亚洲先锋成人| 久久精品亚洲一区二区| 日韩视频在线永久播放| 亚洲婷婷综合久久一本伊一区| 国产亚洲精品久| 亚洲欧洲免费视频| 国产午夜精品视频免费不卡69堂| 免费人成网站在线观看欧美高清 | 久久亚洲春色中文字幕| 亚洲视频电影图片偷拍一区| 欧美一区二区三区精品电影| 亚洲日本aⅴ片在线观看香蕉| 国产精品99久久久久久久vr| 在线成人小视频| 亚洲欧美欧美一区二区三区| 91久久黄色| 欧美在线播放视频| 亚洲欧美欧美一区二区三区| 农村妇女精品| 久久综合激情| 国产日韩欧美在线播放不卡| 日韩视频第一页| 亚洲久久成人| 久久一区欧美| 久久中文在线| 国产亚洲亚洲| 亚洲影视在线| 亚洲综合久久久久| 欧美日韩日本国产亚洲在线| 亚洲国产精品传媒在线观看 | 欧美顶级大胆免费视频| 久久久久一区二区三区| 国产精品福利久久久| 亚洲茄子视频| 亚洲免费播放| 欧美大胆成人| 亚洲国产成人不卡| 亚洲国产精品成人精品| 久久久久久久一区| 久久九九99| 国产亚洲欧美一区在线观看| 亚洲午夜视频在线观看| 亚洲欧美日韩国产中文| 国产精品成人一区二区| 亚洲视频一区二区在线观看 | 欧美国产欧美亚州国产日韩mv天天看完整| 欧美激情 亚洲a∨综合| 欧美福利一区二区| 亚洲电影天堂av| 欧美成人一区二区在线| 亚洲国产精品小视频| 亚洲精品国产精品国自产在线 | 嫩草成人www欧美| 欧美成人亚洲| 亚洲伦理中文字幕| 欧美日韩在线观看一区二区| 亚洲人成亚洲人成在线观看| 亚洲精品日本| 欧美日韩一区二区三区四区五区 | 日韩一级在线| 亚洲专区一二三| 国产亚洲精品v| 久久综合色8888| 亚洲人久久久| 午夜久久99| 在线看无码的免费网站| 欧美精品日韩一本| 亚洲一区二区三区在线视频| 久久久久国产精品麻豆ai换脸| 一区在线播放视频| 欧美日本免费| 欧美一级二级三级蜜桃| 欧美大胆成人| 午夜视频在线观看一区二区| 黄色成人精品网站| 欧美日本亚洲韩国国产| 午夜精品久久久久久99热软件| 米奇777超碰欧美日韩亚洲| 一个色综合av| 精品av久久久久电影| 欧美日韩在线大尺度| 欧美一区二区三区啪啪| 亚洲三级影院| 噜噜噜91成人网| 亚洲男女自偷自拍| 亚洲日本中文| 国内精品视频在线播放| 欧美三级网址| 欧美成人精品三级在线观看 | 亚洲激情欧美| 久久精品国产欧美亚洲人人爽| 91久久极品少妇xxxxⅹ软件| 国产精品女主播| 欧美第一黄色网| 久久国产福利| 亚洲免费在线播放| 亚洲精品一区在线观看香蕉| 老鸭窝毛片一区二区三区| 亚洲欧美大片| 中国成人黄色视屏| 亚洲高清网站| 一区二区在线看| 国内精品久久久久久久影视麻豆| 欧美天堂亚洲电影院在线播放| 蜜臀av在线播放一区二区三区| 欧美一区二区黄| 午夜国产精品影院在线观看|