conan: creating package example doesn't work. No CMAKE_CXX_COMPILER could be found.

Hello world example from http://docs.conan.io/en/latest/packaging/getting_started.html doesn’t work on my windows 10 machine. What am I doing wrong?

islama@FRWN14IT MINGW64 ~/cpp/conan/mypkg
$ conan test_package
Exporting package recipe
Linter warnings
    WARN: Linter. Line 2: Unused import os
WARN: Conanfile doesn't have 'description'.
It is recommended to add it as attribute
Hello/0.1@demo/testing: A new conanfile.py version was exported
Hello/0.1@demo/testing: Folder: C:\Users\islama\.conan\data\Hello\0.1\demo\testing\export
Requirements
    Hello/0.1@demo/testing from local
Packages
    Hello/0.1@demo/testing:63da998e3642b50bee33f4449826b2d623661505

Hello/0.1@demo/testing: WARN: Forced build from source
Hello/0.1@demo/testing: Building your package in C:\Users\islama\.conan\data\Hello\0.1\demo\testing\build\63da998e3642b50bee33f4449826b2d623661505
Hello/0.1@demo/testing: Configuring sources in C:\Users\islama\.conan\data\Hello\0.1\demo\testing\source
Cloning into 'hello'...
remote: Counting objects: 17, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 17 (delta 3), reused 17 (delta 3), pack-reused 0
Unpacking objects: 100% (17/17), done.
Switched to a new branch 'static_shared'
Branch static_shared set up to track remote branch static_shared from origin.
Hello/0.1@demo/testing: Copying sources to build folder
Hello/0.1@demo/testing: Generated cmake created conanbuildinfo.cmake
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:1 (PROJECT):
  No CMAKE_C_COMPILER could be found.



CMake Error at CMakeLists.txt:1 (PROJECT):
  No CMAKE_CXX_COMPILER could be found.



-- Configuring incomplete, errors occurred!
See also "C:/Users/islama/.conan/data/Hello/0.1/demo/testing/build/63da998e3642b50bee33f4449826b2d623661505/CMakeFiles/CMakeOutput.log".
See also "C:/Users/islama/.conan/data/Hello/0.1/demo/testing/build/63da998e3642b50bee33f4449826b2d623661505/CMakeFiles/CMakeError.log".

Hello/0.1@demo/testing: ERROR: Package '63da998e3642b50bee33f4449826b2d623661505' build failed
Hello/0.1@demo/testing: WARN: Build folder C:\Users\islama\.conan\data\Hello\0.1\demo\testing\build\63da998e3642b50bee33f4449826b2d623661505
ERROR: Hello/0.1@demo/testing: Error in build() method, line 27
        self.run('cmake hello %s %s' % (cmake.command_line, shared))
        ConanException: Error 1 while executing cmake hello -G "Visual Studio 14 2015 Win64" -DCONAN_LINK_RUNTIME="/MD" -DCONAN_EXPORTED="1" -DCONAN_COMPILER="Visual Studio" -DCONAN_COMPILER_VERSION="14" -DBUILD_SHARED_LIBS="OFF" -DCONAN_CXX_FLAGS="/MP8" -DCONAN_C_FLAGS="/MP8" -Wno-dev```

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (13 by maintainers)

Most upvoted comments

I just checked - better late than never, right? and it does indeed work great! 😄

I didn’t have time to use a Conan project, and just running conan didn’t create any configuration, but then I realized that Conan now has a separate configuration creation command, and all was well. Great work! 👍