Jun Li
School of Computer Science
McGill University
TA of COMP208 / Materials
- COMP-208: Computers in Engineering, Winter 2008
- Office Hour: Tuesday 10:30~11:30, Wednesday 3:30pm~5:00pm, Thursday 1:00pm~2:30pm, at FDA-1.
- Course Materials: COMP-208 Fall 2007: Prof Wang's Notes,
Prof Hawker's Notes provide very good instruction for "Development Environment Setup"
COMP 208 Problems & Solutions
- Mac - gfortran: For Mac users, the instructions on top of p.8 of "COMP-208 Winter 2007.pdf" from WebCT actually works.
-
1. For the problem: missing crt1.o
This is because your Mac doesn't have Xcode. Please follow the instruction 5, download and install Xcode
BTW, downloading 'Xcode' just needs you to sign up an Apple Developer Connection online membership, which is free.
-
2. Compile and run: please follow instructions on p.11. (Most Linux commands can be used on Mac OS). Here is an example:
- (1) Save source code file in TEXT format,
- (2) Open a Terminal, navigate to the directory stores your file. For example: if you have filename.f90 stored on the Desktop, you need use:
- cd Desktop # the folder name of Deskop is 'Desktop' or '~/Desktop'
- ls filename.f90 #use this command to make sure whether the file is there or not,
- (3) Command for compiling fortran program :
gfortran -x f77 -ffree-form -W -Wall "filename.f90" -o "filename.exe"
- (4) Command for running program:
./filename.exe
- (5) Command for generate output file :
./filename.exe > filename.out
- Website for gfortran, (with newer version for MacOS X Tiger (10.4)), make sure you installed right version
Others