[ https://issues.apache.org/jira/browse/ZOOKEEPER-2874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16124186#comment-16124186 ]
ASF GitHub Bot commented on ZOOKEEPER-2874: ------------------------------------------- Github user andschwa commented on the issue: https://github.com/apache/zookeeper/pull/335 Built on Windows: ```powershell > cmake --build . --config Debug > cmake --build . --config Release > rg libcmt cli.dir\Debug\cli.tlog\link.read.1.tlog 17:C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\COMMUNITY\VC\TOOLS\MSVC\14.10.25017\LIB\X86\LIBCMTD.LIB cli.dir\Release\cli.tlog\link.read.1.tlog 17:C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2017\COMMUNITY\VC\TOOLS\MSVC\14.10.25017\LIB\X86\LIBCMT.LIB ``` As you can see from the logs, the correct library is now being linked. I've also integration tested this with Mesos, and it has eliminated the warning. > Windows Debug builds don't link with `/MTd` > ------------------------------------------- > > Key: ZOOKEEPER-2874 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2874 > Project: ZooKeeper > Issue Type: Bug > Environment: Windows 10 using CMake > Reporter: Andrew Schwartzmeyer > Assignee: Andrew Schwartzmeyer > > While not apparent when building ZooKeeper stand-alone, further testing when > linking with Mesos revealed it was ZooKeeper that was causing the warning: > {noformat} > LIBCMTD.lib(initializers.obj) : warning LNK4098: defaultlib 'libcmt.lib' > conflicts with use of other libs; use /NODEFAULTLIB:library > [C:\Users\andschwa\src\mesos\build\src\slave\mesos-agent.vcxproj] > {noformat} > As Mesos is linking with {{/MTd}} in Debug configuration (which is the most > common practice). > Once I found the source of the warning, the fix is trivial and I am posting a > patch. -- This message was sent by Atlassian JIRA (v6.4.14#64029)