NetBeans 编辑 C/C++ Cygwin

安装 Cygwin 配合 NetBeans 编辑 C/C++

NetBeans 中,我们要编辑 C/C++ 除了要安装 Plugin 外,还要安装 C/C++ Compiler
下方的例子是使用 Cygwin NetBeans 来达成我们的需求:

首先,当然是安装 Cygwin( Windows 平台上的一种 Unix 环境 )
<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter" /> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0" /> <v:f eqn="sum @0 1 0" /> <v:f eqn="sum 0 0 @1" /> <v:f eqn="prod @2 1 2" /> <v:f eqn="prod @3 21600 pixelWidth" /> <v:f eqn="prod @3 21600 pixelHeight" /> <v:f eqn="sum @0 0 1" /> <v:f eqn="prod @6 1 2" /> <v:f eqn="prod @7 21600 pixelWidth" /> <v:f eqn="sum @8 21600 0" /> <v:f eqn="prod @7 21600 pixelHeight" /> <v:f eqn="sum @10 21600 0" /> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" /> <o:lock v:ext="edit" aspectratio="t" /> </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" alt="" style='width:474.75pt; height:84.75pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image001.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_b7fc389c7ea0f63d9c89zmrUjEexhIGg.jpg" /> </v:shape><![endif]--><!--[if !vml]-->
<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter" /> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0" /> <v:f eqn="sum @0 1 0" /> <v:f eqn="sum 0 0 @1" /> <v:f eqn="prod @2 1 2" /> <v:f eqn="prod @3 21600 pixelWidth" /> <v:f eqn="prod @3 21600 pixelHeight" /> <v:f eqn="sum @0 0 1" /> <v:f eqn="prod @6 1 2" /> <v:f eqn="prod @7 21600 pixelWidth" /> <v:f eqn="sum @8 21600 0" /> <v:f eqn="prod @7 21600 pixelHeight" /> <v:f eqn="sum @10 21600 0" /> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" /> <o:lock v:ext="edit" aspectratio="t" /> </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" alt="" style='width:474.75pt; height:84.75pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image001.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_b7fc389c7ea0f63d9c89zmrUjEexhIGg.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->0.jpg (20.19 KB)

2008-1-4 01:15

网址:http://www.cygwin.com/点击,如下方的图示下载安装文件

<!--[if gte vml 1]><v:shape id="_x0000_i1027" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1028" type="#_x0000_t75" alt="" style='width:77.25pt;height:69pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image004.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_6f5e94a49d3757d7563aLivNXIZUpsy9.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1029" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->00.jpg (4.18 KB)

2008-1-4 01:15

请选择下一步<!--[if gte vml 1]><v:shape id="_x0000_i1030" type="#_x0000_t75" alt="" style='width:379.5pt;height:287.25pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image005.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_86f4c7cbc49449fd2499gh5U754uNJYd.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1031" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->1.jpg (48.23 KB)

2008-1-4 01:15

这边我们使用从网络安装 (预设)

<!--[if gte vml 1]><v:shape id="_x0000_i1032" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1033" type="#_x0000_t75" alt="" style='width:377.25pt;height:288.75pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image006.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_6ed7267300455497f01cxA6JCSVYBXZY.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1034" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->2.jpg (33.64 KB)

2008-1-4 01:15

若干的设定如下图,大部份的人比较会动到安装的位置。在这里我安装在 d:/ cygwin下方: <!--[if gte vml 1]><v:shape id="_x0000_i1035" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1036" type="#_x0000_t75" alt="" style='width:375.75pt;height:4in'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image007.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_d29267d4cbee784f3626qodG8Je0HPZi.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1037" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->3.jpg (63.18 KB)

2008-1-4 01:15

接着给他一个,放置下载档案的位置: <!--[if gte vml 1]><v:shape id="_x0000_i1038" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->4.jpg (32.58 KB)

2008-1-4 01:15

选择连结到网络的方式<!--[if gte vml 1]><v:shape id="_x0000_i1039" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1040" type="#_x0000_t75" alt="" style='width:376.5pt;height:4in'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image008.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_17ec5ce1edb02df25ddaSyeMHgcgu64C.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1041" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->5.jpg (33.38 KB)

2008-1-4 01:15

设定从那边下载档案,要选好自己国家或是速度较快的位置不然你可能要等上老半...... <!--[if gte vml 1]><v:shape id="_x0000_i1042" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1043" type="#_x0000_t75" alt="" style='width:375.75pt;height:288.75pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image009.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_441bbc0fae31fa246131pMttRaJipvQ1.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1044" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->6.jpg (47.83 KB)

2008-1-4 01:15

等待他下载安装的信息。
<!--[if gte vml 1]><v:shape id="_x0000_i1045" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1046" type="#_x0000_t75" alt="" style='width:374.25pt;height:288.75pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image010.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_8b57b41486abb3cd8983W6nou0kp8MJE.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1047" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->7.jpg (28.13 KB)

2008-1-4 01:15

选择要安装的 packages
<!--[if gte vml 1]><v:shape id="_x0000_i1048" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1049" type="#_x0000_t75" alt="" style='width:375pt;height:288.75pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image011.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_15c507df7c1eee59dd052tRRMhrie5YZ.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1050" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->8.jpg (44.13 KB)

2008-1-4 01:15

在这边我把右上的 view 点至切换成 Full 来检视 packages
这样,我们可以依字母的排列来找到要安装的 package 及说明
如下图:
<!--[if gte vml 1]><v:shape id="_x0000_i1051" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1052" type="#_x0000_t75" alt="" style='width:243pt;height:25.5pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image012.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_a2760d87eeb15e6c0267OFZMmQ5cJ0mr.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1053" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->10.jpg (4.83 KB)

2008-1-4 01:15

<!--[if gte vml 1]><v:shape id="_x0000_i1054" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1055" type="#_x0000_t75" alt="" style='width:374.25pt;height:286.5pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image013.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_8d62ee378866a958f84b67zjNgrtMBpA.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1056" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->9.jpg (57.71 KB)

2008-1-4 01:15

然后,我们安装需要用到的四个 package 就好
分别是 gdb gcc-core gcc-c++ make ,如下图所示:

<!--[if gte vml 1]><v:shape id="_x0000_i1057" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1058" type="#_x0000_t75" alt="" style='width:365.25pt;height:16.5pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image014.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_ef06c714bb332bbb2f56zk16mxtqB6Rz.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1059" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->11.jpg (4.48 KB)

2008-1-4 01:15


<!--[if gte vml 1]><v:shape id="_x0000_i1060" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1061" type="#_x0000_t75" alt="" style='width:357.75pt;height:30.75pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image015.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_d674b53ddd0aee052a8fP42PB98vJyoV.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1062" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->12.jpg (7.16 KB)

2008-1-4 01:15


<!--[if gte vml 1]><v:shape id="_x0000_i1063" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1064" type="#_x0000_t75" alt="" style='width:417pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image016.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_d3812fd209d1dc3759bas9xkKyKKe5wH.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1065" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->13.jpg (4.8 KB)

2008-1-4 01:15

选好之后,按下一步并等待安装结束。

<!--[if gte vml 1]><v:shape id="_x0000_i1066" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1067" type="#_x0000_t75" alt="" style='width:376.5pt;height:291.75pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image017.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_9eab156cf8fa9495cfc0TmNpr8hCcDr0.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1068" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->14.jpg (31.64 KB)

2008-1-4 01:15

要不要放 link 就因个人习惯.....
<!--[if gte vml 1]><v:shape id="_x0000_i1069" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1070" type="#_x0000_t75" alt="" style='width:377.25pt;height:287.25pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image018.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_c44061470915b9d0b0d0hOnwixrPlgX2.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1071" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->16.jpg (31.34 KB)

2008-1-4 01:15

之后在环境变量中设置
CYGWIN_HOME
为安装的目录,在这边是 D:/cygwin
PATH
加入,%CYGWIN_HOME%/bin,原本有的内容要以 ; 串接哦!

<!--[if gte vml 1]><v:shape id="_x0000_i1072" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1073" type="#_x0000_t75" alt="" style='width:255.75pt;height:41.25pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image019.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_63d3f8bd7165b444ee2aZNOLGv8DTH8U.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1074" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->17.jpg (12.31 KB)

2008-1-4 01:15

设好了之后到 NetBeans 中选 Tools ---> Plugin

<!--[if gte vml 1]><v:shape id="_x0000_i1075" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1076" type="#_x0000_t75" alt="" style='width:180pt;height:289.5pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image020.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_b6f8d920f332a210c7beFGPFPbVWK99r.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1077" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->18.jpg (24.21 KB)

2008-1-4 01:15

让我们在可安装的 Plugins 中选择 C/C++,并按 Install
<!--[if gte vml 1]><v:shape id="_x0000_i1078" type="#_x0000_t75" alt="" style='width:629.25pt;height:413.25pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image021.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_0c5085a7b94bba08136f5uL38lKvYgEg.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1079" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->19.jpg (98.46 KB)

2008-1-4 01:15

Next

<!--[if gte vml 1]><v:shape id="_x0000_i1080" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1081" type="#_x0000_t75" alt="" style='width:380.25pt;height:212.25pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image022.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_27f187caa1b4ddaae4bdaqspjJxL5ukU.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1082" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->20.jpg (25.9 KB)

2008-1-4 01:15

I accept ....... 并按 Install

<!--[if gte vml 1]><v:shape id="_x0000_i1083" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1084" type="#_x0000_t75" alt="" style='width:380.25pt;height:309pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image023.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_ddb47eb5dd4d5e4f05devIDHKUnqbBVh.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1085" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->21.jpg (75.33 KB)

2008-1-4 01:15

等待下载及安装过程

<!--[if gte vml 1]><v:shape id="_x0000_i1086" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1087" type="#_x0000_t75" alt="" style='width:382.5pt;height:261pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image024.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_1eccf337d1a8924be40clYkR2ko8bzl3.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1088" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->22.jpg (26.87 KB)

2008-1-4 01:15

显示安装 plugin 完成

<!--[if gte vml 1]><v:shape id="_x0000_i1089" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1090" type="#_x0000_t75" alt="" style='width:381.75pt;height:273pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image025.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_9ca3f81e6fee106c9cf2SwXmKh4Ffjqi.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1091" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->23.jpg (26.15 KB)

2008-1-4 01:15

如下图,我们就可以在 new project 中看到 C/C++
相关的种类:

我们在建立的 Project 中的 Properties 中可以看到
GNU Complier Collection from Cygwin
, 如下图:

<!--[if gte vml 1]><v:shape id="_x0000_i1092" type="#_x0000_t75" alt="" style='width:564pt;height:161.25pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image026.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_ead44372f8438363fca42DwZS89UpY8p.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1093" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->25.jpg (42.2 KB)

2008-1-4 01:15



视需要 ( 如在用 JNI ),记得要设定 Complier 中的 Command Line
-mno-cygwin -Wl,--add-stdcall-alias -shared -m32
如下图

<!--[if gte vml 1]><v:shape id="_x0000_i1094" type="#_x0000_t75" alt="" style='width:15pt;height:15pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image003.gif" o:href="http://aa.pro.vexp.idv.tw/images/Picnicker/attachimg.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--><!--[if gte vml 1]><v:shape id="_x0000_i1095" type="#_x0000_t75" alt="" style='width:561pt;height:131.25pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image027.jpg" o:href="http://aa.pro.vexp.idv.tw/attachments/month_0801/20080104_cfa65c074697c9ca52c3kbSweId4WjFc.jpg" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

<!--[if gte vml 1]><v:shape id="_x0000_i1096" type="#_x0000_t75" alt="" style='width:12pt;height:12pt'> <v:imagedata src="file:///E:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/msohtml1/01/clip_image002.gif" o:href="http://aa.pro.vexp.idv.tw/images/attachicons/image.gif" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->26.jpg (20.65 KB)

2008-1-4 01:15



上方,参数的意义如下:
The -mno-cygwin option, enables building DLLs that have no dependencies on Cygwin own libraries and thus can be executed on machines which do not have Cygwin installed.
The -Wl,--add-stdcall-alias passes the --add-stdcall-alias option to the linker; without it, the resulting application would fail with the UnsatisfiedLinkError.
The -shared option tells the compiler to generate a DLL ( not an executable file).
-m32 tells the compiler to create a 32-bit binary. On 64-bit systems the compiled binaries are 64-bit by default , which causes a lot of problems with 32-bit JDKs.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值