Closed zuowanbushiwo closed 3 years ago
Hi @zuowanbushiwo
It seems you are ignoring the warning about compiler.libcxx=libstdc++
:
You have instructions there of something that you can try:
$ conan profile update settings.compiler.libcxx=libstdc++11 default
Please try that.
@memsharded
Thanks!
When I run that commad for the first time, I get the following error:
packager@4572e3152c19:~/examples/libraries/poco/md5$ conan profile update settings.compiler.libcxx=libstdc++11 default
ERROR: Profile not found: default
When I used ./build.sh to compile, the above link error occurred again, then use the following command
conan profile update settings.compiler.libcxx=libstdc++11 default
This time there is no error, and then I will use . /build.sh again , then the program runs success.
I have one other question: These packages downloaded by build md5 example:
bzip2/1.0.8
expat/2.4.1
openssl/1.1.1k
pcre/8.45
poco/1.9.4
sqlite3/3.36.0
zlib/1.2.11
my other projects can be found through find_package(OpenSSL REQUIRED) or PKG_CHECK_MODULES(ZLIB zlib REQUIRED) called by those method?
best regards
It is because the default
profile doesn't exist until it is required the first time. You can force its creation with conan profile new default --detect
.
my other projects can be found through find_package(OpenSSL REQUIRED) or PKG_CHECK_MODULES(ZLIB zlib REQUIRED) called by those method?
That depends on the generator that you use. The getting started uses the cmake
generator that requires to add the include(....../conanbuildinfo.cmake)
, and then use the CONAN_LIBS
variable or CONAN_PKG::xxxx
variables.
If you use the new CMakeDeps
generator, for example, Conan will generate for you xxx-config.cmake
scripts, and then you can use with find_package(xxxx REQUIRED)
(need to be used together with CMakeToolchain and CMake from https://docs.conan.io/en/latest/reference/conanfile/tools.html)
@memsharded Thanks , Can you give me some guidance on this issue https://github.com/conan-io/cmake-conan/issues/356 ? I need some complicated profiles, conanfile.txt and connanfile.y to solve this error? Do you know any examples you can refer to? best regards
My advice for this would be to avoid using cmake-conan integration until you gain some experience and understand better conan.
If this issue was responded correctly and it works, we can close it and follow conversation in the other one, thanks!
Hi