0

Hy all,

I want to build a project with Conan C/C++ Package manager, i have some issues... it can't find the Conanfile but the Conanfile exists! ...

CentOs ...

I have a folder "mytimer" :

[user mytimer]$ ls
build  CMakeLists.txt  Conanfile.txt  LICENSE  README.md  timer.cpp

and I want to build in "build" folder :

[user mytimer]$ cd build
[user build]$ conan install --file ../Conanfile.txt ..
**ERROR: Conanfile not found!**

How can I fix this ? thank you :)

  • Sorry, this question has some issues. First you have to properly describe your folder layout, which files in which folders. Then copy verbatim the command you are typing, from which location (folder, pwd). Don't do it in an external image file, do it in the question itself. Questions have to be mostly self-contained. CMake is not a compiler, it is a meta-build system, that will typically generate Makefiles (for your Linux distro), that will use gcc or other compiler. – drodri Feb 01 '17 at 11:30
  • There are two types of conanfiles .txt and .py, you have to use an extension to let conan know which type are you using. You can change the filename, but please keep the extension – drodri Feb 01 '17 at 11:39
  • Ok sorry... I modified the question –  Feb 01 '17 at 11:49
  • You have an extra leading "..", unnecessary to specify the path, you are already using it in the --file argument – drodri Feb 01 '17 at 11:50

1 Answers1

5

You have an extra leading path. Use either:

[user build]$ conan install --file ../Conanfile.txt

or

[user build]$ conan install --file Conanfile.txt ..
drodri
  • 5,157
  • 15
  • 21
  • Another problem : [user build]$ conan install --file Conanfile.txt .. ERROR: Conanfile: 'settings.compiler' value not defined setting.compiler I don't find it –  Feb 01 '17 at 11:55
  • Yes, but that is a different issue. You should probably submit a new question, this one regarding the command not locating the Conanfile seems that was already addressed. Also, it seems that your knowledge of conan might be a bit preliminary, I suggest doing a complete execution of the getting started in http://docs.conan.io/en/latest/getting_started.html focus on #building-with-other-configurations section. It seems in your case detection of your default compiler failed, maybe was not installed? Please submit a new question with details – drodri Feb 01 '17 at 12:03