[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make problem
From: |
Colin S. Miller |
Subject: |
Re: make problem |
Date: |
Mon, 25 Sep 2006 20:16:22 +0100 |
User-agent: |
Thunderbird 1.5.0.5 (X11/20060812) |
gmarkowsky@gmail.com wrote:
Hi all,
libNLM.a(output.o): In function `output_':
output.f90:(.text+0x2e4): undefined reference to `nf_close_'
output.f90:(.text+0x381): undefined reference to `nf_close_'
output.f90:(.text+0x47d): undefined reference to `nf_close_'
libUTIL.a(close_io.o): In function `close_io_':
close_io.f90:(.text+0x42): undefined reference to `nf_close_'
close_io.f90:(.text+0x6d): undefined reference to `nf_close_'
libUTIL.a(close_io.o):close_io.f90:(.text+0x98): more undefined
references to `nf_close_' follow
libUTIL.a(close_io.o): In function `close_io_':
So what gives? Is it not finding something? Then why does it not say
"file not found"? What does the -L part mean? Haven't been able to
figure that out.
Greg,
-L/path/to/lib
adds the path to the search directories for libraries (collections of object
files).
> libNLM.a(output.o): In function `output_':
> output.f90:(.text+0x2e4): undefined reference to `nf_close_'
> output.f90:(.text+0x381): undefined reference to `nf_close_'
> output.f90:(.text+0x47d): undefined reference to `nf_close_'
means that the function output_[0], in
the object file "output.o" (probably from output.f)
in libNLM.a, referenced the function nf_close_, but this
function could not be found.
In Unix, an object (or library) that defines a function,
must be listed after the object (or library) that calls
that function.
[0]
Or 'output', most computer languages change the name of the functions
in the object files. E.g., in C, all functions are preceded with a '_'.
It appears that fortran appends a '_'.
HTH,
Colin S. Miller
Greg
--
Replace the obvious in my email address with the first three letters of the
hostname to reply.