Skip to content

does not compile #1

Description

@sena73

The reason is wrong directory name in some_libraries/include. Either CMakeList.txt or cpp file must be updated

$ cd some_libraries
$ mkdir build
$ cd build/
$ cmake  ..
-- The CXX compiler identification is GNU 8.3.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ss/src/cmake-example/cmake_tutorial/some_libraries/build
$ make
Scanning dependencies of target SomeLibraryB
[ 25%] Building CXX object CMakeFiles/SomeLibraryB.dir/src/some_library_b.cpp.o
/home/ss/src/cmake-example/cmake_tutorial/some_libraries/src/some_library_b.cpp:2:10: fatal error: SomeLibraries/some_library_b.hpp: No such file or directory
 #include "SomeLibraries/some_library_b.hpp"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/SomeLibraryB.dir/build.make:63: CMakeFiles/SomeLibraryB.dir/src/some_library_b.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/SomeLibraryB.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions