任我行

一天一个脚印......
每日一句:
posts - 54, comments - 218, trackbacks - 1, articles - 0
  C++博客 :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

打造UltralEdit-32为C/C++编译器

Posted on 2006-04-20 14:24 任我行 阅读(8358) 评论(16)  编辑 收藏 引用

这文章适合新手,对老鸟就不要太强求了。

为方便更多网友在使用UltralEdit-32的同时,挖掘UltralEdit-32更多的功能。当初我在使用UltralEdit-32配置编译环境的时候,费了几个弯弯。
UltraEdit-32这个强大文字编译器应该用过吧。通过一些简单的配置也可以做成编译器哦。
虽然比不上像VC这么强大的编译器,但是对于一些简单的程序,特别是单个文件的编译,非常的方便,不用你去建立什么工程等等。。。

下面就来配置我们的UltraEdit-32吧。
第一步、首先当然是下载UltraEdit-32,最好下载一个中文版,然后安装。

第二步、下载C/C++编译器。
推荐:MinGW(一个Windows平台下的GCC编译器,属于免费的哦。)
http://sourceforge.net/projects/mingw,选择一个版本比较高的下载,我下的是MinGW3.1 版本:http://jaist.dl.sourceforge.net/sourceforge/mingw/MinGW-3.1.0-1.exe
然后安装好。具体安装就不啰嗦了。 

第三步、设置环境变量path:
这里以我的机器为例说明:在path最后面加入C:\MinGW\bin;然后调出DOS窗口,键入>>gcc,如果输出:gcc: no input files,说明你的环境配置好了。这时可以用gcc编译程序了,不过,在Dos窗口中就是不方便。输入:
>>gcc --help会输出gcc的一些编译设置,
>>gcc -v 输出gcc的版本等信息。
>>gcc -o xxx.exe xxx.cpp 编译xxx.cpp文件,生成xxx.exe可执行文件。
更多的gcc命令请参考gcc手册。网上搜搜,会有很多。这里贴一个GCC中文手册

第四步、设置UltralEdit-32:
打开UltralEdit-32,高级->工具栏设置,这时会跳出一个窗口(UltralEdit-32版本不同稍有差别),点插入,在菜单项目名称输入:Compile C/C++;在命令行输入:g++ -o %n.exe %p%n%e;工作目录输入%p;基本上与在DOS窗口中编译没有什么区别。还可以选用自己指定的库,lib,include文件等,参考GCC手册。
这里%n(UltralEdit-32本身的参数)表示你正在编写的文件名,%e表示扩展名,%p表示此文件的目录。具体请查看UltralEdit-32的帮助。
在选项一栏有Dos和Windows程序可选择,表示你编译的程序类型,输出一栏请勾中输出到列表框,捕获输出和不替换。
然后应用、确定,在高级一栏就会出现一个"Compile C/C++"菜单。
点击"Compile C/C++"菜单看会出现什么效果?
到这时,UltralEdit-32编译器配置的差不多了。但每次都要高级->Compile C/C++也挺不方便的。要是能想VC那样把这个菜单放到界面上来就好了。

第五步、把"Compile C/C++"搬到工具栏:
这一步比较简单,在工具栏右键->自定义工具栏,在出现的窗口中右侧找到刚才添加的菜单,用户工具1,添加到左侧栏,自己调整顺序,确定,OK了。
同样的办法,还可以添加一个名为"运行"的菜单,就是运行刚才编译好的程序,然后添加到工具栏。

到这时,大功告成了。

程序写好了 -> Compile C/C++ -> Run...
有点像VC6哦。

最后,别对UltralEdit-32要求太高。至于其它应用,待你我的挖掘中。

Feedback

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2006-04-20 14:33 by Neo
cool!

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2006-04-24 08:36 by john
cool too !

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2006-04-30 15:34 by
今天心情好,你不如用uestudio了,都配置好了

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2006-05-26 23:40 by roger007
偶只用过它来编译JAVA,
只是尝鲜而已,没太多感觉。

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2006-06-05 00:07 by rainday
这些技巧玩玩不错.真的用起来就不怎么样了.^_^

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2006-06-07 01:37 by 伪子
C/C++编译器? UE能算编译器吗?

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2006-06-10 13:11 by 空明流转
slickedit也不错。不过如果单论还是VS比较贴心。

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2006-11-17 17:39 by 李锦俊
还是比较喜欢VS。。没有代码提示,没有跟踪,会很麻烦的,就好像当年用EditPlus写ASP一样!我更喜欢EditPlus!欢迎到我的blog做客哦!http://www.cppblog.com/mybios/

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2008-11-22 11:48 by 123
mingw怎么安装的?用别的c编译器行么?gcc又是什么?彻底晕了...

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2009-04-29 17:17 by 创意家居
不错哦

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2010-06-12 01:41 by GracieVelasquez28
You are manifestly, a real master of dissertation international just about this topic accomplishing but if you are willing to opt for the <a href="http://www.topthesis.com">dissertation writing</a>, I will ofer you to notice a perfect one.

# re: 打造UltralEdit-32为C/C++编译器[未登录]  回复  更多评论   

2011-10-16 11:09 by 123
赞,可以用来写简单的测试程序!

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2011-12-12 12:51 by article submission services
Articles should be submitted to top rated article directories. The better Google page rank is, the simpler is to rank your Seo articles in search engines. Our article submission service will aid your website having better rates!

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2013-12-11 13:34 by Best writing services company
At present, a lot of learners are seeking for fine quality custom research papers. PrimeWritings rewiew (best-writing-services.com) will offer an opportunity for graduates to find the most dependable custom essay writing service from which they are able to purchase first-rate dissertations created from the very beginning.

# re: 打造UltralEdit-32为C/C++编译器  回复  更多评论   

2013-12-11 14:03 by Web page
Whenever you do not know where to buy CV, visit Resumesexpert company, check out our CV templates and get qualified and professional resume writing service from the certified resume writers who know how to write a successful resume. It is of great worth buying resume with us!

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理