Detecting required dependencies and linking

We have now all generated files in place, so let us retry the build. We should be able to configure and compile the sources, but we will not be able to link:

$ mkdir -p build$ cd build$ cmake ..$ cmake --build ....Scanning dependencies of target vim[ 98%] Building C object src/CMakeFiles/vim.dir/main.c.o[100%] Linking C executable ../bin/vim../lib64/libbasic_sources.a(term.c.o): In function `set_shellsize.part.12':term.c:(.text+0x2bd): undefined reference to `tputs'../lib64/libbasic_sources.a(term.c.o): In function `getlinecol':term.c:(.text+0x902): undefined reference to `tgetent'term.c:(.text+0x915): undefined reference to `tgetent'term.c:(.text+0x935): undefined reference to `tgetnum'term.c:(.text+0x948): ...

Get CMake Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.