Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fortran Compiler PRoblem

Status
Not open for further replies.

afflictedd2

Programmer
Nov 20, 2008
4
US
Hi guys,

I don't know any fortran.. but I need to compile a program that is in fortran, what I thought a matter of just finding a compiler.. seems to be more than that.

I'm trying to build this but it tells me this options are invalid, what version of fortran compiles with this options?

$ make finstall
cd ./Fortran; make
cd Cshot ; make
gfortran -O -static -mcpu=i686 -fno-globals -fno-automatic -fno-second-underscore -c -o contin.o contin.f
f951: error: unrecognized command line option "-mcpu=i686"
f951: error: unrecognized command line option "-fno-globals"
make[2]: *** [contin.o] Error 1
make[1]: *** [INSTALL] Error 2
make: *** [finstall] Error 2

I'm on a Mac Book Pro with Leopard OS.

Any help appreciated.

Ed.
 
hehe sorry.. I just figured it out

had to change to -march.

gfortran -O -static -march=i686 -fno-automatic -fno-second-underscore cshot1.f -o /opt/SU/bin/cshot1 libcshot.a

 
Uh oh.. Now I get this error though..

gfortran -O -static -march=i686 -fno-automatic -fno-second-underscore cshot2.f -o /opt/SU/bin/cshot2 libcshot.a
ld_classic: can't locate file for: -lcrt0.o
collect2: ld returned 1 exit status
make[2]: *** [/opt/SU/bin/cshot2] Error 1
make[1]: *** [INSTALL] Error 2
make: *** [finstall] Error 2

Anyone know where to find that crt0.o file?

Ed
 
> Anyone know where to find that crt0.o file?
I have all GNU compilers: g77, g95 and gfortran and I have found crt0.o nowhere (I have found only crt1.o and crt2.o).
So it seems that the file should be delivered with he app you try to compile. Examine your make file.

 
Hmm.. well you see what I am compiling, does it just fine in Unix.

But when I try it on Mac OS I get that silly error.

Do you know where I can find the appropriate fortan compiler for Mac =\.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top