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

            Design&Art

            C++博客 首頁 新隨筆 聯(lián)系 聚合 管理
              26 Posts :: 0 Stories :: 38 Comments :: 0 Trackbacks
            為了使用hash_map,今天下載了STLport,在VC6下編譯成功。

            1. STLport下載:http://www.stlport.org/
                  我下載的是最新版  02.25.07: STLport 5.1.2 released

            2. STLport編譯:
                  我的STLport目錄是:D:\STLport-5.1.2
                  先設置一下VC6下的環(huán)境變量:C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT
                 把D:\STLport-5.1.2\stlport;加入Include路徑中;把D:\STLport-5.1.2\lib;加入Lib路徑中
                  在命令行窗口下:
                  運行VCVARS32.BAT,然后
                  cd D:\STLport-5.1.2\build\lib
                  configure -c msvc6
                  nmake /fmsvc.mak install
                  編譯全部用的默認選項,因此編譯出來的是多線程靜態(tài)鏈接庫。庫文件被拷貝到D:\STLport-5.1.2\lib

            3. 在VC6中使用STLport:
                  Tools->Options...->Directories中
                  include設置中添加目錄:D:\STLport-5.1.2\stlport
                  library設置中添加目錄:D:\STLport-5.1.2\lib
                  Project->Settings...->C/C++中
                  Category選擇Code Generation,然后在use run-time library中選擇Debug Multithreaded。(如果是release版本,選擇Multithreaded;如果想用動態(tài)鏈接,則要先編譯動態(tài)鏈接版本的STLport,再在這兒選擇相應的DLL)

            4. hash_map的例子:
            #include <iostream>
            #include 
            <hash_map>
            #include 
            <string>

            using namespace std;

            int main()
            {
                hash_map
            <intstring> mymap;
                mymap[
            2008]="VC6";
                mymap[
            999999]="STLport";
                mymap[
            123456]="hello hash_map!";
                hash_map
            <intstring>::iterator iter = mymap.find(123456);
                
            if(iter != mymap.end())
                
            {
                    cout
            <<iter->second<<endl;
                }

                
            return 0;
            }

            posted on 2007-04-16 14:22 安帛偉 閱讀(8402) 評論(21)  編輯 收藏 引用 所屬分類: STL

            Feedback

            # re: VC6下使用STLPort 2007-05-20 21:12 risefei
            若問:設置一下VC6下的環(huán)境變量:C:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT
            怎么設置?  回復  更多評論
              

            # re: VC6下使用STLPort 2007-05-20 23:24 abware
            @risefei
            用記事本打開VCVARS32.BAT
            查找set INCLUDE=和set LIB=
            把D:\STLport-5.1.2\stlport;加入Include路徑中;把D:\STLport-5.1.2\lib;加入Lib路徑中
            示例如下:
            set INCLUDE=D:\STLport-5.1.3\stlport;%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE%
            set LIB=D:\STLport-5.1.3\lib;%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB%
              回復  更多評論
              

            # re: VC6下使用STLPort[未登錄] 2007-06-12 16:45 hh
            好象沒有你下的餓哪個版本只有STLport-4.6.2.tar.gz這個里面沒有l(wèi)ib文件夾 也沒有*.lib文件! xp下的cmd不能認識make nmake 命令啊!怎么辦?  回復  更多評論
              

            # re: VC6下使用STLPort[未登錄] 2007-06-12 22:11 hh
            我按照以上弄好了 不過編譯文件時 錯誤更多了!例如:
            error C2039: 'ostream' : is not a member of 'stlp_std'
            error C2061: syntax error : identifier 'ostream' 等等! 是什么問題 請指教!3Q  回復  更多評論
              

            # re: VC6下使用STLPort[未登錄] 2007-06-13 10:20 hh
            針對你上面寫的那個程序也有問題 LIKE是有9個錯誤 !是我那里沒有設置正確 ?
            其中的一個錯誤:unresolved external symbol "class stlpmtx_std::basic_ostream<char,class stlpmtx_std::char_traits<char> > stlpmtx_std::cout" (?cout@stlpmtx_std@@3V?$basic_ostream@DV?$char_traits@D@stlpmtx_std@@@1@A)  回復  更多評論
              

            # re: VC6下使用STLPort報這個錯誤是怎么回事啊 2007-06-22 15:37 lee
            LINK : fatal error LNK1104: cannot open file "stlport_static_stld50.lib"
            Error executing link.exe.  回復  更多評論
              

            # re: VC6下使用STLPort 2007-06-26 20:40 abware
            看看你編譯出來的庫文件在哪,該路徑是否加到了VC6的環(huán)境變量配置文件VCVARS32.BAT中
            @lee
              回復  更多評論
              

            # re: VC6下使用STLPort 2007-06-26 20:42 abware
            @hh
            你仔細按照步驟來,特別注意第3步里use run-time library中選擇的版本要和你編譯出來的版本一致。  回復  更多評論
              

            # re: VC6下使用STLPort 2008-01-09 13:10 wsfyc
            看了這篇文章,LINK問題終于解決了.按照步驟可定 成功。我的是STLPORT5-1-4  回復  更多評論
              

            # re: VC6下使用STLPort[未登錄] 2008-01-10 20:31 Eric
            @hh
            請問您這個問題是怎么解決的?,我也有這個問題@@

            謝謝:)  回復  更多評論
              

            # re: VC6下使用STLPort 2008-04-10 02:27 人渣
            好東西啊,謝謝您了  回復  更多評論
              

            # re: VC6下使用STLPort 2008-05-12 00:31 zyz
            @abware
            這個怎么提示 不是內(nèi)部指令呢?  回復  更多評論
              

            # re: VC6下使用STLPort 2008-10-14 21:42 smallping
            我用的是錄制動畫程序Camstudio-2.0-src,按照上面的配置做好了,但編譯之后錯誤更多,如下:
            ompiling...
            FFont.cpp
            D:\Camstudio-2[1].0-src\vscap20s\Producer\swfsource\FFont.h(22) : error C2039: 'ostream' : is not a member of 'stlp_std'
            D:\Camstudio-2[1].0-src\vscap20s\Producer\swfsource\FFont.h(22) : error C2061: syntax error : identifier 'ostream'
            D:\Camstudio-2[1].0-src\vscap20s\Producer\swfsource\FFont.h(22) : error C2039: 'istream' : is not a member of 'stlp_std'
            D:\Camstudio-2[1].0-src\vscap20s\Producer\swfsource\FFont.h(22) : error C2061: syntax error : identifier 'istream'
            D:\Camstudio-2[1].0-src\vscap20s\Producer\swfsource\FFont.h(28) : error C2039: 'istream' : is not a member of 'stlp_std'
            D:\Camstudio-2[1].0-src\vscap20s\Producer\swfsource\FFont.h(28) : error C2143: syntax error : missing ';' before '&'
            D:\Camstudio-2[1].0-src\vscap20s\Producer\swfsource\FFont.h(28) : error C2433: 'istream' : 'friend' not permitted on data declarations
            D:\Camstudio-2[1].0-src\vscap20s\Producer\swfsource\FFont.h(28) : error C2501: 'istream' : missing storage-class or type specifiers

            不知是什么原因,怎么也搞不明白,急急急!!!
            那位好心的大哥知道請告訴我。
            郵箱:smallping_hit@yahoo.com.cn  回復  更多評論
              

            # re: VC6下使用STLPort 2008-10-29 17:56 guobosheng
            在執(zhí)行 nmake /fmsvc.mak install 命令時出錯:'nmake' 不是內(nèi)
            或批處理文件。

            這個問題怎么解決的?急!謝謝幫忙!  回復  更多評論
              

            # re: VC6下使用STLPort 2008-10-29 18:00 guobosheng
            @hh

            你是否也有 'nmake' 不是內(nèi)部或外部命令,也不是可運行的程序或批處理文件。這個問題?你是怎么解決的?  回復  更多評論
              

            # re: VC6下使用STLPort 2008-10-30 10:07 guobosheng
            @guobosheng
            關于“'nmake' 不是內(nèi)部或外部命令,也不是可運行的程序或批處理文件。”問題的解決辦法:

            在“我的電腦--屬性--高級--環(huán)境變量”中, 添加如下變量:
              INCLUDE
              D:\Program Files\Microsoft Visual Studio\VC98\Include
              LIB
              D:\Program Files\Microsoft Visual Studio\VC98\Lib
              X:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;X:\Program Files\Microsoft Visual Studio\VC98\Bin
              X表示安裝盤符,注意這里是兩個路徑,因為cl.exe要用到MSDev98\Bin目錄下的MSPDB60.DLL。
              如果已經(jīng)存在這些變量,則把以上值分別加在對應的變量值的后面,注意在添加前用分號隔開。  回復  更多評論
              

            # re: VC6下使用STLPort 2008-10-30 10:27 guobosheng
            編譯STLPort后出現(xiàn)102個錯誤!~~誰能救救我?
            錯誤信息:

            --------------------Configuration: stl - Win32 Debug--------------------
            Compiling...
            stl.cpp
            c:\program files\microsoft visual studio\vc98\include\string(17) : error C2143: syntax error : missing ';' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(17) : error C2433: 'basic_string' : 'inline' not permitted on data declarations
            c:\program files\microsoft visual studio\vc98\include\string(17) : error C2501: 'basic_string' : missing storage-class or type specifiers
            c:\program files\microsoft visual studio\vc98\include\string(17) : error C2059: syntax error : ';'
            c:\program files\microsoft visual studio\vc98\include\string(17) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(24) : error C2143: syntax error : missing ';' before '{'
            c:\program files\microsoft visual studio\vc98\include\string(24) : error C2447: missing function header (old-style formal list?)
            c:\program files\microsoft visual studio\vc98\include\string(25) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(26) : error C2143: syntax error : missing ';' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(26) : error C2433: 'basic_string' : 'inline' not permitted on data declarations
            c:\program files\microsoft visual studio\vc98\include\string(26) : error C2501: 'basic_string' : missing storage-class or type specifiers
            c:\program files\microsoft visual studio\vc98\include\string(26) : error C2086: 'basic_string' : redefinition
            c:\program files\microsoft visual studio\vc98\include\string(26) : error C2059: syntax error : ';'
            c:\program files\microsoft visual studio\vc98\include\string(26) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(33) : error C2143: syntax error : missing ';' before '{'
            c:\program files\microsoft visual studio\vc98\include\string(33) : error C2447: missing function header (old-style formal list?)
            c:\program files\microsoft visual studio\vc98\include\string(34) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(35) : error C2143: syntax error : missing ';' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(35) : error C2433: 'basic_string' : 'inline' not permitted on data declarations
            c:\program files\microsoft visual studio\vc98\include\string(35) : error C2501: 'basic_string' : missing storage-class or type specifiers
            c:\program files\microsoft visual studio\vc98\include\string(35) : error C2086: 'basic_string' : redefinition
            c:\program files\microsoft visual studio\vc98\include\string(35) : error C2059: syntax error : ';'
            c:\program files\microsoft visual studio\vc98\include\string(35) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(41) : error C2143: syntax error : missing ';' before '{'
            c:\program files\microsoft visual studio\vc98\include\string(41) : error C2447: missing function header (old-style formal list?)
            c:\program files\microsoft visual studio\vc98\include\string(42) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(44) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(44) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(45) : error C2803: 'operator ==' must have at least one formal parameter of class type
            c:\program files\microsoft visual studio\vc98\include\string(46) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(47) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(47) : error C2059: syntax error : '<'
              回復  更多評論
              

            # re: VC6下使用STLPort 2008-10-30 10:28 guobosheng
            續(xù):

            c:\program files\microsoft visual studio\vc98\include\string(49) : error C2803: 'operator ==' must have at least one formal parameter of class type
            c:\program files\microsoft visual studio\vc98\include\string(49) : error C2805: binary 'operator ==' has too few parameters
            c:\program files\microsoft visual studio\vc98\include\string(50) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(51) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(51) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(53) : error C2803: 'operator !=' must have at least one formal parameter of class type
            c:\program files\microsoft visual studio\vc98\include\string(53) : error C2805: binary 'operator !=' has too few parameters
            c:\program files\microsoft visual studio\vc98\include\string(54) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(56) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(56) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(57) : error C2803: 'operator !=' must have at least one formal parameter of class type
            c:\program files\microsoft visual studio\vc98\include\string(58) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(59) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(59) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(62) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(63) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(63) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(65) : error C2803: 'operator <' must have at least one formal parameter of class type
            c:\program files\microsoft visual studio\vc98\include\string(65) : error C2805: binary 'operator <' has too few parameters
            c:\program files\microsoft visual studio\vc98\include\string(66) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(68) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(68) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(69) : error C2803: 'operator <' must have at least one formal parameter of class type
            c:\program files\microsoft visual studio\vc98\include\string(70) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(71) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(71) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(74) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(75) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(75) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(77) : error C2803: 'operator >' must have at least one formal parameter of class type
            c:\program files\microsoft visual studio\vc98\include\string(77) : error C2805: binary 'operator >' has too few parameters
            c:\program files\microsoft visual studio\vc98\include\string(78) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(80) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(80) : error C2059: syntax error : '<'
              回復  更多評論
              

            # re: VC6下使用STLPort 2008-10-30 10:28 guobosheng
            續(xù):

            c:\program files\microsoft visual studio\vc98\include\string(81) : error C2803: 'operator >' must have at least one formal parameter of class type
            c:\program files\microsoft visual studio\vc98\include\string(82) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(83) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(83) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(86) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(87) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(87) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(89) : error C2803: 'operator <=' must have at least one formal parameter of class type
            c:\program files\microsoft visual studio\vc98\include\string(89) : error C2805: binary 'operator <=' has too few parameters
            c:\program files\microsoft visual studio\vc98\include\string(90) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(92) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(92) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(93) : error C2803: 'operator <=' must have at least one formal parameter of class type
            c:\program files\microsoft visual studio\vc98\include\string(94) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(95) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(95) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(98) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(99) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(99) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(101) : error C2803: 'operator >=' must have at least one formal parameter of class type
            c:\program files\microsoft visual studio\vc98\include\string(101) : error C2805: binary 'operator >=' has too few parameters
            c:\program files\microsoft visual studio\vc98\include\string(102) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(104) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(104) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(105) : error C2803: 'operator >=' must have at least one formal parameter of class type
            c:\program files\microsoft visual studio\vc98\include\string(106) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(107) : error C2143: syntax error : missing ',' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(107) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(111) : error C2954: template definitions cannot nest
            c:\program files\microsoft visual studio\vc98\include\string(112) : error C2143: syntax error : missing ';' before '<'
            c:\program files\microsoft visual studio\vc98\include\string(112) : error C2433: 'basic_istream' : 'inline' not permitted on data declarations
            c:\program files\microsoft visual studio\vc98\include\string(112) : error C2501: 'basic_istream' : missing storage-class or type specifiers
            c:\program files\microsoft visual studio\vc98\include\string(112) : error C2059: syntax error : ';'
            c:\program files\microsoft visual studio\vc98\include\string(112) : error C2059: syntax error : '<'
            c:\program files\microsoft visual studio\vc98\include\string(147) : error C2143: syntax error : missing ';' before '{'
            c:\program files\microsoft visual studio\vc98\include\string(147) : fatal error C1003: error count exceeds 100; stopping compilation
            Error executing cl.exe.

            stl.obj - 102 error(s), 0 warning(s)



              回復  更多評論
              

            # re: VC6下使用STLPort 2008-10-30 10:43 guobosheng
            上面的問題解決了:

            在樓主的第三步中:
            3. 在VC6中使用STLport:
            Tools->Options...->Directories中
            include設置中添加目錄:D:\STLport-5.1.2\stlport
            library設置中添加目錄:D:\STLport-5.1.2\lib

            添加了上面兩個目錄后,需要把它們向上移,放在第一位。這樣就沒有問題了,至于為什么,我想可能是有的信息只有在上面兩個目錄下下才能找到吧,先找別的目錄可能會因為找不到而出錯。只是我的猜測,也不知道具體原因,請高手指點。  回復  更多評論
              

            # re: VC6下使用STLPort[未登錄] 2008-10-30 11:40 cc

            樓主,在編譯STLPort的過程中會報錯

            無法定位程序輸入點RtlIpv4StringToAddressW于動態(tài)庫ntdll.dll上

            不過我用的STLPort 5.1.5  回復  更多評論
              

            精品久久人人爽天天玩人人妻 | 99热成人精品免费久久| 一本综合久久国产二区| 久久青草国产手机看片福利盒子| 日韩精品久久久久久免费| 97精品依人久久久大香线蕉97| 色综合久久中文字幕综合网| 品成人欧美大片久久国产欧美 | 色综合久久久久久久久五月| 久久久久亚洲AV无码专区首JN| 久久99国产精品久久99小说| 久久久国产99久久国产一| 久久精品亚洲AV久久久无码| 亚洲中文字幕无码久久综合网| 日日躁夜夜躁狠狠久久AV| 国产Av激情久久无码天堂| 国产一级持黄大片99久久| 91精品国产91久久久久久| 久久国产香蕉视频| 久久久久久曰本AV免费免费| 亚洲AV日韩精品久久久久久久| 99久久夜色精品国产网站| 国产午夜福利精品久久2021| 欧美综合天天夜夜久久| 久久无码国产| 麻豆成人久久精品二区三区免费| 久久er国产精品免费观看2| 久久精品无码专区免费| 精品国产日韩久久亚洲 | 精品久久久久久国产91| 狠狠色伊人久久精品综合网| 久久久久久久波多野结衣高潮| 国产精品美女久久久m| 精品国产青草久久久久福利| 午夜人妻久久久久久久久| 超级碰久久免费公开视频| 99久久香蕉国产线看观香| 久久精品国产亚洲av麻豆色欲 | 少妇熟女久久综合网色欲| 97久久超碰成人精品网站| 午夜精品久久影院蜜桃|