• <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++細節(jié)深度探索及軟件工程

              C++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
              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 常興龍 閱讀(877) 評論(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的博客
            久久精品国产亚洲一区二区三区| 亚洲熟妇无码另类久久久| 国产精品美女久久久| 久久99国产乱子伦精品免费| 国产精品青草久久久久婷婷| AA级片免费看视频久久| 久久亚洲国产精品成人AV秋霞 | 品成人欧美大片久久国产欧美| 久久婷婷久久一区二区三区| 久久99精品国产麻豆蜜芽| 久久久久99这里有精品10| 精品国产乱码久久久久久1区2区 | 久久久精品波多野结衣| 2021国产精品午夜久久| 97久久精品无码一区二区| 久久精品成人免费观看97| 久久香综合精品久久伊人| 亚洲人AV永久一区二区三区久久 | 亚洲国产一成人久久精品 | 国产精品成人久久久| 久久精品国产半推半就| 色偷偷偷久久伊人大杳蕉| 麻豆久久久9性大片| 久久夜色精品国产www| 91精品国产91久久综合| 无码人妻久久一区二区三区免费丨| 国产午夜精品久久久久九九| 青青国产成人久久91网| 国产精品久久久久jk制服| 久久AV无码精品人妻糸列| 久久91精品综合国产首页| 国产成人香蕉久久久久| 久久精品男人影院| 久久亚洲国产午夜精品理论片| 99精品国产在热久久无毒不卡 | 久久精品国产99久久久古代| 国产A级毛片久久久精品毛片| 久久久精品一区二区三区| 成人国内精品久久久久一区| 久久久老熟女一区二区三区| 久久精品国产亚洲77777|