Re: Linking fails
- From: Harald van Dijk <truedfx@xxxxxxxxx>
- Date: Tue, 9 Dec 2008 19:28:20 +0000 (UTC)
On Tue, 09 Dec 2008 13:58:32 -0500, Martin Ambuhl wrote:
pete wrote:
Klaus Pirker wrote:
However, when I try to compile & link I get the following error
message:
/tmp/ccKOPY3f.o(.text+0x4d): In function `main': : undefined reference
to `_mm_clflush' collect2: ld returned 1 exit status
It means that _mm_clflush is neither
declared in <stdio.h>, nor in <emmintrin.h>.
Wrong. Wrong. Wild guesses again lead to silly answers. If the
identifier were not declared, that would lead to a compilation
diagnostic.
No, it would not, if the compiler does not issue diagnostics for implicit
function declarations. C90 compilers aren't required to, and plenty do not
by default.
The _linking_ diagnostic means that the function could not
be found in the files being linked, including any libraries used. This
usually signals failure to link a library required for that function.
In this case, I'd guess _mm_clflush is supposed to be defined as a macro
or an inline function in some header. No library would be required, but
you do need to include the correct header, because that is the only place
it would be defined.
.
- References:
- Linking fails
- From: Klaus Pirker
- Re: Linking fails
- From: pete
- Re: Linking fails
- From: Martin Ambuhl
- Linking fails
- Prev by Date: Re: Linking fails
- Next by Date: what should be the output
- Previous by thread: Re: Linking fails
- Next by thread: Re: Linking fails
- Index(es):
Relevant Pages
|