[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sat, 22 Dec 2012 09:20:07 -0500
I created a 2-line fortran program and a simple make file (below) to
illustrate the problem that I am having. When I run make, I get the following
output. Note that if I simply copy and paste the final gfortran line (the
linking step) into my terminal window, the executable builds. It is as if
make is overriding the normal library location. I have not tried specifying a
library location, but it does not seem that it should be necessary.
gfortran -c makeTest.f90
gfortran makeTest.o -o makeTest.x
Undefined symbols for architecture x86_64:
"start", referenced from:
-u command line option
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [makeTest.x] Error 1
FC = gfortran
$(FC) makeTest.o -o makeTest.x
$(FC) -c makeTest.f90
fortran source file named makeTest.f90
write (*,*) 'hello'
gnu make version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
This program built for i386-apple-darwin11.3.0
R3 Technology, Inc.
"Rapid Relevant, Responsive"
7324 Fountain Spring Ct
Springfield, VA 22150
703 879-4501 office
210 858-5107 FAX
- not linking,
Jack Riegel <=