Roxanne Roxanne - 10 months ago 69
C Question

Error collect2 : ld returned exit status

When I try to compile my file, I have this error:

/tmp/ccN3Rs5C.o : Dans la fonction « BellmanFord » :
bellman.c:(.text+0x27c) : référence indéfinie vers « min »
collect2: error: ld returned 1 exit status

I searched on several forums without success.

The problem is my function?

Answer Source

You might be missing one of the following:

  1. Compilation of the file that contains the function definition, or
  2. Missing to the link the file that contains compilation output (from the above step).

For a quick overview of compilation and linking process, see this