Hi guys,
I know this post is quite similar to this one so I apologize in advance in case I cause any irritation. Unfortunately I have to compile an f.77 code on my snowleopard and try writing a mixed language code using fortran and C++. this is part of the research in our team and I am still bumping heads with the other guys on writing programs in C++. anyways, I have donwloaded the .dmg file from GCC's website that is supposed to instal gfortran 4.5.0 for snowleopard. but when I type gfortran in the terminal just to check whether the compiler has been installed correctly I get :
I believe this means that the OS is using the 4.2.1 version by default. But this isnt the main problem I'm having. As I try compiling a simple hello program
I get the following error in the console:
I am using eclipse helios with photran but the same error pops up when I try compiling the code in the terminal. Anyways, It indicates that Im having some incompatibilities compiling the code for 64bit.
so, any ideas on how to fix this? I really hate working with fortran I just hope I get this over with soon
I know this post is quite similar to this one so I apologize in advance in case I cause any irritation. Unfortunately I have to compile an f.77 code on my snowleopard and try writing a mixed language code using fortran and C++. this is part of the research in our team and I am still bumping heads with the other guys on writing programs in C++. anyways, I have donwloaded the .dmg file from GCC's website that is supposed to instal gfortran 4.5.0 for snowleopard. but when I type gfortran in the terminal just to check whether the compiler has been installed correctly I get :
Code:
bamdad-hosseinis-macbook-pro:usr bamdadhosseini$ gfortran
i686-apple-darwin10-gfortran-4.2.1: no input files
I believe this means that the OS is using the 4.2.1 version by default. But this isnt the main problem I'm having. As I try compiling a simple hello program
Code:
program hello
implicit none
end program hello
I get the following error in the console:
Code:
Building target: hello
Invoking: MacOS X Fortran Linker
gfortran -o "hello" ./hello.o
ld: warning: in /usr/local/lib/libgfortran.dylib, file was built for i386 which is not the architecture being linked (x86_64)
Undefined symbols:
"__gfortran_set_std", referenced from:
_MAIN__ in hello.o
"__gfortran_set_args", referenced from:
_main in libgfortranbegin.a(fmain.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [hello] Error 1
I am using eclipse helios with photran but the same error pops up when I try compiling the code in the terminal. Anyways, It indicates that Im having some incompatibilities compiling the code for 64bit.
so, any ideas on how to fix this? I really hate working with fortran I just hope I get this over with soon