public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* newbie gfortran question
       [not found] <e05330e09b40.e09b40e05330@ma22.eresmas.com>
@ 2005-06-18 23:51 ` Jeff Tibbitt
  2005-06-19  0:42   ` Kamaraju Kusumanchi
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Tibbitt @ 2005-06-18 23:51 UTC (permalink / raw)
  To: gcc-help

Hi,

I recently downloaded the gfortran compiler for my new 
ibook with OSX 10.3.5

I tried compiling a simple fortran program named hello.f90



The command I issued was:

gfortran -o a.out hello.f90



The error I get is:

Claws-Computer:~/test/practice Claw$ gfortran -o a.out 
hello.f90
/usr/bin/ld: can't locate file for: -lcrt1.o
collect2: ld returned 1 exit status



When I compile using the -c flag to produce an object file, 
it works.  Then when I try to make the executable the same 
error happens.

Im pretty new at fortran and Mac, and could really use a 
suggestion.

Thanks,

Jeff



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: newbie gfortran question
  2005-06-18 23:51 ` newbie gfortran question Jeff Tibbitt
@ 2005-06-19  0:42   ` Kamaraju Kusumanchi
  0 siblings, 0 replies; 2+ messages in thread
From: Kamaraju Kusumanchi @ 2005-06-19  0:42 UTC (permalink / raw)
  To: gcc-help

Jeff Tibbitt wrote:

>Hi,
>
>I recently downloaded the gfortran compiler for my new 
>ibook with OSX 10.3.5
>
>I tried compiling a simple fortran program named hello.f90
>
>
>
>The command I issued was:
>
>gfortran -o a.out hello.f90
>
>
>
>The error I get is:
>
>Claws-Computer:~/test/practice Claw$ gfortran -o a.out 
>hello.f90
>/usr/bin/ld: can't locate file for: -lcrt1.o
>collect2: ld returned 1 exit status
>  
>
This is linker error. You need to make sure that libctrl.o is in your path.

A simple solution is to use the -static option and see if it works.

gfortran -static hello.f90 -o a.out

>When I compile using the -c flag to produce an object file, 
>it works.  Then when I try to make the executable the same 
>error happens.
>  
>
-c option just compiles it to object file. Where as producing executable 
involves linking the object files.

>Im pretty new at fortran and Mac, and could really use a 
>suggestion.
>  
>
In the future, you might get a better/quicker help if you post questions 
related to gfortran on their mailing list fortran@gcc.gnu.org (google 
for instructions on how to subscribe to it) instead of gcc-help.

raju

-- 
Kamaraju S Kusumanchi
Graduate Student, MAE
Cornell University
http://www.people.cornell.edu/pages/kk288/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-19  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <e05330e09b40.e09b40e05330@ma22.eresmas.com>
2005-06-18 23:51 ` newbie gfortran question Jeff Tibbitt
2005-06-19  0:42   ` Kamaraju Kusumanchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).