Hello
I have tried to compile the program:
program hello
print *, 'Hello!'
end program hello
using gfortran. I saved the file in my home directory as hello.f90 and wrote:
gfortran hello.f90
being in my home directory.
I get the error:
/usr/bin/ld: hello.f77 bad magic number (not a Mach-O file)
/usr/bin/ld: warning can't open dynamic library: /libgcc_s.1.dylib referenced from: /usr/local/lib/gcc/i386-apple-darwin8.10.1/4.3.0/../../../libgfortran.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
Can anyone help me? Which program do people use to write Fortran scripts and do you save them as .f90? Have I tried to compile the file the right way?
I must say that I am an absolute beginner in both using the terminal and at programming in general.
I have had some problems installing the gfortran. I downloaded a complete install from http://www.macresearch.org/xcode_gfortran_plugin_update. The installation was without problems (I have had problems with versions from the GNU webpage). But is there anyway I can check that I did it right?
Thanks in advance.
I have tried to compile the program:
program hello
print *, 'Hello!'
end program hello
using gfortran. I saved the file in my home directory as hello.f90 and wrote:
gfortran hello.f90
being in my home directory.
I get the error:
/usr/bin/ld: hello.f77 bad magic number (not a Mach-O file)
/usr/bin/ld: warning can't open dynamic library: /libgcc_s.1.dylib referenced from: /usr/local/lib/gcc/i386-apple-darwin8.10.1/4.3.0/../../../libgfortran.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
Can anyone help me? Which program do people use to write Fortran scripts and do you save them as .f90? Have I tried to compile the file the right way?
I must say that I am an absolute beginner in both using the terminal and at programming in general.
I have had some problems installing the gfortran. I downloaded a complete install from http://www.macresearch.org/xcode_gfortran_plugin_update. The installation was without problems (I have had problems with versions from the GNU webpage). But is there anyway I can check that I did it right?
Thanks in advance.