How to Compile Fortran Code on Mac and Unix Systems?

  • Context: Fortran 
  • Thread starter Thread starter qinjie1629
  • Start date Start date
  • Tags Tags
    Compiler Fortran Mac
Click For Summary
SUMMARY

This discussion focuses on compiling Fortran code on Mac and Unix systems using gfortran version 4.2.1. Users report successful compilation of code files but encounter runtime errors related to pointer structures when executing the compiled files. The issue appears to stem from compatibility differences between Windows XP and Mac OS X 10.6 environments. Participants seek assistance in compiling these files correctly on Unix or Mac platforms.

PREREQUISITES
  • Understanding of Fortran programming language
  • Familiarity with gfortran compiler version 4.2.1
  • Basic knowledge of Mac OS X 10.6 operating system
  • Experience with debugging runtime errors in compiled code
NEXT STEPS
  • Research how to resolve pointer-related errors in Fortran
  • Learn about differences in Fortran behavior between Windows and Mac OS
  • Explore the latest version of gfortran for improved compatibility
  • Investigate alternative compilers for Fortran on Unix systems
USEFUL FOR

Fortran developers, software engineers working on cross-platform code, and anyone troubleshooting compilation issues on Mac and Unix systems.

qinjie1629
Messages
2
Reaction score
0
I have several fortran code files which can be correctly compiled and run in Windows XP using gfortran. But, when I use the gfortran 4.2.1 compile these files on Mac(10.6), the code files can be compiled, but, it reports errors when I run the compiled file.

the error is related to the pointer of a structure type of data.

Can you gus compile these files for me under Unix or Mac.
 
Technology news on Phys.org
here is the source code files (4 files). anyboby help?
 

Attachments

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K