如果你學習C++,請不要選擇DevCpp

來源:互聯網
上載者:User

作者:朱金燦

來源:http://blog.csdn.net/clever101/


      有網友發信給我,說使用DevCpp編譯一個MTL庫的測試程式出現一堆莫名其妙的錯誤。


      DevCpp我聽說過,以前也下載使用過,據說號稱Windows平台下的gcc。結果我用DevCpp一編譯網友的程式,感覺此編譯器不堪大用。


      網友的測試程式是這樣的:

#include <iostream><br />#include <boost/numeric/mtl/mtl.hpp><br />int main(int argc, char* argv[])<br />{<br /> using namespace mtl;<br /> // Define dense vector of doubles with 10 elements all set to 0.0.<br /> dense_vector<double> v(10, 0.0);<br /> // Set element 7 to 3.0.<br /> v[7]= 3.0;<br /> std::cout << "v is " << v << "/n";<br /> return 0;<br />}<br />


     結果出現莫名其妙的錯誤,說實話它的編譯錯誤提示極為晦澀,我基本看不懂,只好以圖為證:

但是我用VS 2008 + sp1編譯這個程式,則一點問題都沒有。看看網友怎麼評論DevCpp的吧:


        Get rid of Dev-C++ and download VC++ 2008 Express. If you have any difficulties after that, let us know.
Dev-C++ has not been supported by its creators for a long time. It is horribly out of date. You might be able to just update your version of the compiler and keep the IDE as-is, but you get a really good debugger integrated with VC++ 2008 Express that really blows the competition away.


評論來自:
http://bbs.prog365.com/c-programming-on-using-mtl-matrix-template-library-in-dev-c-4.9.8.0-190-1-1.html


        所以在Windows平台下學習C++,我建議你選擇VS 2005及更高版本的VS,或者選擇開源的CodeBlocks。







聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.