• <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>

            C++研究

            C++細節深度探索及軟件工程

              C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
              37 隨筆 :: 0 文章 :: 74 評論 :: 0 Trackbacks


                 A project used ADO method making connection to mysql may not work so well and may not so effictive ,  thus , use Mysql C-Api is a rather good scheme , but the C-Api  is rather tougn for beginner , fortunately , An project called Mysql++ lib avaliable for C++ programmer. It's better than C-Api , but there is a problem while using with winsock2 on the platform Ms-windows .
            Any question , contact me as follows:

            cxl82116@msn.com
            QQ:286259397 
            天津大學計算機學院 常興龍



                The problem may appear like this :

            c:\program files\devstudio\vc98\include\winsock2.h(99) : error C2011: 'fd_set' : 'struct' type redefinition
            c:\program files\devstudio\vc98\include\winsock2.h(134) : warning C4005: 'FD_SET' : macro redefinition
            c:\program files\devstudio\vc98\include\winsock.h(83) : see previous definition of 'FD_SET'
            c:\program files\devstudio\vc98\include\winsock2.h(143) : error C2011: 'timeval' : 'struct' type redefinition
            c:\program files\devstudio\vc98\include\winsock2.h(199) : error C2011: 'hostent' : 'struct' type redefinition
            c:\program files\devstudio\vc98\include\winsock2.h(212) : error C2011: 'netent' : 'struct' type redefinition
            c:\program files\devstudio\vc98\include\winsock2.h(219) : error C2011: 'servent' : 'struct' type redefinition 

            The problem tells its own table , the winsock.h was included somewhere . As we know , using the winsock and winsock2 must notice these :

             

             Winsock2.h must be inclued before winsock.h

            if you use windows.h , you must use like this :

               #define WIN32_LEAN_AND_MEAN
               #include <windows.h>

            but , this time , the winsock.h inclued in the diretory /Mysql++ 2.2.3 /lib/Common.h ,What could I do to enable Winsock2 in my project and make no impress on other projects?

            this is a unified way to make the things easier and clear - Condition Compiler , you can code like this :

            #ifdef _CXL_WINSOCK2
             #include <winsock2.h>
             #pragma message("###The compiler's behavior Changed by Chang xinglong to Enable winsock2 in Mysql++...###")
            #else
             #include <winsock.h>
            #endif 

            after done , you define _CXL_WINSOCK2  in your project to enable winsock2  or leave it to use winsock.

            posted on 2007-06-07 16:58 常興龍 閱讀(880) 評論(2)  編輯 收藏 引用

            評論

            # re: Something problem resovled [Winsock2&mysql++-2.2.3 Sdk compatible problem] 2007-06-14 21:18 hinobou
            從軟件學院看到了你的文章,來拜訪一下
            為啥要用英文寫啊,看著怪累的^^  回復  更多評論
              

            # re: Something problem resovled [Winsock2&mysql++-2.2.3 Sdk compatible problem] 2007-06-14 21:55 天津大學計算機學院 常興龍
            呵呵。。。。中文打字慢。。。你的Blog不錯哦。  回復  更多評論
              

            > hi的博客
            狠狠久久综合伊人不卡| 久久久久亚洲AV无码麻豆| 国产69精品久久久久观看软件| 久久亚洲精品成人av无码网站| 亚洲综合婷婷久久| 99久久777色| 嫩草伊人久久精品少妇AV| 亚洲精品国产第一综合99久久| 久久久久中文字幕| 欧美一区二区三区久久综合| 亚洲另类欧美综合久久图片区| 国产福利电影一区二区三区,免费久久久久久久精 | 精品无码人妻久久久久久| 精品国际久久久久999波多野 | 久久久久久国产精品无码下载| 久久人人爽爽爽人久久久| 一本一本久久aa综合精品| 国产香蕉久久精品综合网| 色悠久久久久久久综合网| 精品水蜜桃久久久久久久| 狠狠久久综合伊人不卡| 久久久久久一区国产精品| 久久成人精品| 亚洲午夜精品久久久久久app| 亚洲精品视频久久久| 久久久久久精品久久久久| 亚洲中文字幕无码久久精品1| 免费精品久久天干天干| 综合久久国产九一剧情麻豆| 精品久久久中文字幕人妻| 久久久久久夜精品精品免费啦| 国产美女久久精品香蕉69| 一本伊大人香蕉久久网手机| 国产成人AV综合久久| 欧美日韩精品久久久久| 久久人人爽人人爽人人片AV东京热| 亚洲AV日韩精品久久久久久| 精品久久一区二区| 亚洲欧美精品一区久久中文字幕| 狠狠色丁香久久婷婷综合| 久久精品国产99国产精品澳门|