开贴介绍一个小型 Fortran 编程环境的安装及搭建。这一 Fortran 编程环境是由两款免费软件搭建而成, MinGW 负责编译, Code::Blocks 负责前端的图形界面。环境搭建过程描述在下: 1. 下载( here )并安装 MinGW ( 32bit ),双击 mingw-get-setup.exe 开始安装,当出现如图 1 所示窗口时,注意勾选 mingw32-base ( C Compiler ,也安装它的原因是 the C compiler is always installed )和 -gcc-fortran ( Fortran Compiler ),选中之后依次 Installation-Apply Changes ,等待片刻自动下载安装文件,安装完成后关闭打开的窗口。 图 1 2. 下载( here ) Code::Blocks ,依据系统平台选择下载文件,这里选择 For WindowsCodeBlocks_Fortran_v1.2_Win.zip ,这里不需要安装,解压之后双击 codeblocks.exe ,程序自动检测到 Fortran Compiler 显示如图 2 ,选中 GNU Fortran Compiler ,再选中旁边的 Set as default ,这时当下的默认编译器即为 Fortran Compiler ,再 OK 。紧接着弹出图 3 窗口,这里直接选择 OK ,以后还可以再修改。 图 2 图 3 3. 新建和打开 Fortran 程序参考: To create a new fortran program click on fileNewFileSelect Fortran SourceHit Go and follow the instructions in the dialog box ; To open an existing fortran source file select FileOpen and navigate to the fortran source file 。 Code::Blocks 界面颜色修改方法,颜色修改作用于 Editor 部分,这部分又分为两块分别设置背景颜色,如图 4 的 1 和 2 。 图 4 对于 1 , Settings-Environment-Colours-Editor: Line numbers background colour , set your colour. 对于 2 , Settings- Editor-Syntax highlighting-Default 。 字体设置 In Settings - Editor...- General Settings click Choose. It's the button in the top-right corner. References FORTRAN Programming Environment For Windows Mac OSX . MinGW, Minimalist GNU forWindows . Code::Blocks, The opensource, cross platform, free C, C++ and Fortran IDE . CodeBlocks_User_Manual_en.pdf . Code::Blocks IDE for Fortran . Ten minutes to setup Modern Fortran 2003-2008 on Windows.pdf .
Geany 是一个轻量级、快速、免费,开源、跨平台的一个IDE,支持较好的语言有 C, Java, PHP, HTML, Python, Perl, Pascal等。 官方网站: http://www.geany.org/ Some basic features of Geany: Syntax highlighting Code folding Symbol name auto-completion Construct completion/snippets Auto-closing of XML and HTML tags Call tips Many supported filetypes including C, Java, PHP, HTML, Python, Perl, Pascal ( full list ) Symbol lists Code navigation Build system to compile and execute your code Simple project management Plugin interface (see Plugins ) Geany的 优点 是轻量级,相对Eclipse、Netbeans等大型IDE速度快,也能支持自动补全、语法高亮等简单的开发需求,堪当EditPlus、UltraEdit等编辑器的替代品; 缺点 是对微软的语言支持不够,好像没.Net各语言的开发环境,当然轻量级的IDE也缺乏一些大型IDE的一些复杂功能。 需要注意的 是自动补全需要设置下快捷键,软件自带的快捷键是CTRL+SPACE,这和我们的中文输入法冲突,我修改成了TAB;自动补全功能需要自己重新设置下,象括号、符号配对等常用功能,默认没有开启。博主未测试Windows下该软件的性能,欢迎补充完善。