|||
开贴介绍一个小型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 file>New>File>Select Fortran Source>Hit Go and follow the instructions in the dialog box;To open an existing fortran source file select File>Open> 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
[1] FORTRAN Programming Environment For Windows & Mac OSX.
[2] MinGW, Minimalist GNU forWindows.
[3] Code::Blocks, The opensource, cross platform, free C, C++ and Fortran IDE.
[4] CodeBlocks_User_Manual_en.pdf.
[5] Code::Blocks IDE for Fortran.
[6] Ten minutes to setup Modern Fortran 2003-2008 on Windows.pdf.
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-22 15:50
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社