conan-io / examples

Conan 1.x examples
MIT License
124 stars 66 forks source link

Conan MD5 hash calculator example not working #56

Closed gurpreetshanky closed 4 years ago

gurpreetshanky commented 4 years ago

Just wanted to tried Conan on Fedora 31 with g++ 9.2.1. It says ERROR: compiler not defined for compiler.libcxx Please define compiler value first too

I even set the "conan profile update settings.compiler.libcxx=libstdc++11 default ". Thanks

memsharded commented 4 years ago

Hi @gurpreetshanky

Are you creating a package? Are you trying to consume existing packages? If you could please paste here the full commands that you are using (I would recommend something very simple, if you can reproduce with the conan new hello/0.1 -s in case you are creating a package, instead of with your custom recipe, much better), including the full output, that would help. Also the output of conan profile show default. Thanks

gurpreetshanky commented 4 years ago

Hi @memsharded , Sorry for late reply. Here is the output for conan profile show default. Configuration for profile default:

[settings] os=Linux os_build=Linux arch=x86_64 arch_build=x86_64 build_type=Release compiler.libcxx=libstdc++11 [options] [build_requires] [env]

I'm just trying out the example to consume binaries from starting example. https://docs.conan.io/en/latest/getting_started.html

memsharded commented 4 years ago

Hi @gurpreetshanky

As you can see, for some reason, the auto detect for the default profile has not detected any compiler. Typically you should have there something like compiler=gcc and compiler.version=9. If you remove the ~/.conan/profiles/default file, and issue the command again, you will see some messages of the detection. Please copy the full output here.

What is the output if you type gcc --version in your terminal?

gurpreetshanky commented 4 years ago

okk I solved the problem now. But I had to use cmake .. -DCONAN_LIBCXX=libstdc++. Thanks again.