Quote:
Originally Posted by knudfl
I.e. the "-devel" packages are required, when compiling
|
Indeed.
I should clarify my response so that anyone that reads this isn't left with half the story (in a manner of speaking). The original error was:
Code:
/usr/bin/ld: cannot find -lncurses
This error is caused by the linker. Creating a binary executable requires roughly two stages: compiling and linking--in that sequence.
The "-devel" packages contain source code files useful for the compilation stage. The source code in the "-devel" packages identify what external support is available to the program (such as ncurses terminal-drawing capabilities).
The linking stage no longer relies on source code, but rather, connects the new program with pre-compiled libraries. The pre-compiled libraries contain the machine code instructions that actually provide the support the new program wanted.
When creating a new binary, you typically need both: the "-devel" packages associated with a support library
and the library itself.
Because the error above was a linker problem, the compiling would seem to have finished without error. That said, there are instances where a compiler warning has caused one of my own compile jobs to fail at the linking stage.
Anyway, the moral of the story is: install both source/development packages (for the source code) and the libraries itself.