Trying to build your Poco example.
PocoFoundationmdd.lib(Clock.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj
PocoFoundationmdd.lib(Clock.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in main.obj
Running conan:
conan install .. -s build_type=Debug --build
cmake .. -G "Visual Studio 14 2015 Win64"
Tried just --build=missing but that didn't work.
Try passing -DCMAKE_BUILD_TYPE=Debug to the cmake command. It seems it is mixing debug and release symbols.
Anyway, the issues related with a concrete package build error should be opened in the recipe repository, in this case lasote/conan-poco
If there is an error in the getting started guide please open it in the conan-io/docs repository.
Thanks.
I think the issue is with the runtime library. If you are building with debug you need:
$ conan install .. -s build_type=Debug -s compiler="Visual Studio" -s compiler.runtime=MDd --build=missing
$ cmake .. -G "Visual Studio 14 2015 Win64"
$ cmake --build . --config Debug
Please try that and tell me. The reason is that the default setting is MD and that can conflict. Probably, in production you want to use profiles that define your input settings. Thanks!
Hi @Socapex
Have you been able to try the above? Any news on this? Please tell us, so we can determine if some action is required. Thanks!
I've fixed the issue by running install using both Debug and Release configs, and using cmake_multi. As discussed here https://github.com/conan-io/conan/issues/330
I followed these steps and it works great : http://docs.conan.io/en/latest/integrations/cmake/cmake_multi_generator.html
I would still rather have a single conan command, to make it even easier for my users. Something like : conan install .. --build missing -s build_type=DebugAndRelease
Thanks for following up and reporting.
Glad it is working.
Who are your users? Because CLion and Visual Studio plugins are on the roadmap, maybe you would like to follow and test them when they are developed.
Visual Studio (and potentially Xcode) are the main IDEs used. Though most ppl will probably run the steps from the command prompt.
Visual studio addon issue, if you want to follow there: https://github.com/conan-io/conan/issues/2353
For simplifying yours users life, I'd consider to add a "start.py" script or something similar in the root of your project, that will call conan with the configurations you want.
I get this same error in VS trying to build the example in Debug (which is the default when you open the generated project, so everyone is going to run into this problem when following your example).
Trying the cmake_multi generator didn't help because it can't find the Windows Debug prebuilt packages and it can't build them from source:
zlib/1.2.11@conan/stable: Package '56fd5f54f07a0483c2943eea801af00e17403f93' built
zlib/1.2.11@conan/stable: Build folder C:\Users\richard\.conan\data\zlib\1.2.11\conan\stable\build\56fd5f54f07a0483c2943eea801af00e17403f93
zlib/1.2.11@conan/stable: Generated conaninfo.txt
zlib/1.2.11@conan/stable: Generated conanbuildinfo.txt
zlib/1.2.11@conan/stable: Generating the package
zlib/1.2.11@conan/stable: Package folder C:\Users\richard\.conan\data\zlib\1.2.11\conan\stable\package\56fd5f54f07a0483c2943eea801af00e17403f93
zlib/1.2.11@conan/stable: Calling package()
zlib/1.2.11@conan/stable: WARN: local cache: True
zlib/1.2.11@conan/stable: WARN: develop: False
zlib/1.2.11@conan/stable package(): Copied 1 '' files: LICENSE
zlib/1.2.11@conan/stable package(): Copied 12 '.h' files
zlib/1.2.11@conan/stable package(): Copied 1 '.pc' files: zlib.pc
zlib/1.2.11@conan/stable package(): Copied 1 '.lib' files: zlibstaticd.lib
zlib/1.2.11@conan/stable: Package '56fd5f54f07a0483c2943eea801af00e17403f93' created
OpenSSL/1.0.2l@conan/stable: Installing build requirements of: OpenSSL/1.0.2l@conan/stable
OpenSSL/1.0.2l@conan/stable: Build requires: [strawberryperl/5.26.0@conan/stable]
strawberryperl/5.26.0@conan/stable: Not found in local cache, looking in remotes...
strawberryperl/5.26.0@conan/stable: Trying with 'conan-center'...
Downloading conanmanifest.txt
[==================================================] 58B/58B
Downloading conanfile.py
[==================================================] 1.6KB/1.6KB
ERROR: strawberryperl/5.26.0@conan/stable: Error in configure() method, line 29
raise Exception("Only windows supported for strawberry perl")
Exception: Only windows supported for strawberry perl
@LegalizeAdulthood did you try the solution proposed above: -DCMAKE_BUILD_TYPE=Debug?
This solution worked for me. Appreciate it! I searched for a while before I found this thread.
For me, my profile (~/.conan/profiles/default) was faulty. I replcaed it with this:
For VS 2019:
[settings]
os=Windows
arch=x86_64
compiler=Visual Studio
compiler.version=16
[options]
[build_requires]
[env]
@aminya
You are missing build_type in your profile. It is necessary for most cases, so I strongly recommend adding it, (and overriding in command line with -s build_type=xxx if necessary)