creating package example doesn't work. No CMAKE_CXX_COMPILER could be found.
See original GitHub issueHello 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```
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (13 by maintainers)
Top Results From Across the Web
CMake error at CMakeLists.txt:30 (project) - Stack Overflow
No CMAKE_C_COMPILER could be found. No CMAKE_CXX_COMPILER could be found. Might disappear unless you specify c compiler like clang, and maybe installing clang ......
Read more >Developers - creating package example doesn't work. No ...
creating package example doesn't work. No CMAKE_CXX_COMPILER could be found. ... Hello world example from http://docs.conan.io/en/latest/packaging ...
Read more >No CMAKE_C_COMPILER could be found. No ...
Hi, Long story short, I've been struggling with a project in both VS2017 and VS2019, with both CMake 3.18 and CMake 3.21.1.
Read more >No CMAKE_CXX_COMPILER could be found
I can't get CMake to work on our project. It's working fine for other people and it used to work for me but...
Read more >Configure and build with CMake Presets in Visual Studio
Select Manage Configurations to open the CMakePresets.json file located at the root of the project. CMakePresets.json is created if it doesn't ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
x-ref detailed solution: https://stackoverflow.com/a/45319119/508431
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! 👍