I was using cmake
to compile a large c++ project with many dependencies, for the first time, on a new system. With each sub-project, in this case Boost, it would sometimes stop with this error. The solution was to install the development library, e.g. boost-devel
(or @development-libs to get them all). They had neglected to mention these were required. But I was paying the price for not installing the full development system.
CMakeFiles/dep_BOOST.dir
conftest.c /usr/bin/ld: /usr/lib64/../lib64/crt1.o: in function `_start':(.text 0x1b):
undefined reference to `main'
collect2: error: ld returned 1 exit status