You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Roger Leigh (JIRA)" <xe...@xml.apache.org> on 2018/01/02 15:18:00 UTC

[jira] [Commented] (XERCESC-2128) VS2017 creates static lib as output whilst linking against DLL runtime

    [ https://issues.apache.org/jira/browse/XERCESC-2128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16308200#comment-16308200 ] 

Roger Leigh commented on XERCESC-2128:
--------------------------------------

I think these setting are largely orthogonal.  The choice of building a static or shared xerces library is separate to choosing a static or shared C++ runtime, though you might certainly want to use both together.

Please see https://cmake.org/Wiki/CMake_FAQ#How_can_I_build_my_MSVC_application_with_a_static_runtime.3F for the official advice.  We could certainly adopt one of the suggestions there to make it an opt-in setting.

> VS2017 creates static lib as output whilst linking against DLL runtime
> ----------------------------------------------------------------------
>
>                 Key: XERCESC-2128
>                 URL: https://issues.apache.org/jira/browse/XERCESC-2128
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.2.0
>         Environment: Windows 7, Visual Studio 2017, CMake 3.10.1
>            Reporter: Frank Kaaijk
>
> The solution created by CMake (setting BUILD_SHARED_LIBS to OFF) contains xerces-c project that has an configuration type "Static library (.lib)" yet the setting for Code generation is set to Multi-threaded DLL (/MD).
> When using this .lib I now get linker errors like these:
> 1>xerces-c_3D.lib(IC_Key.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in DMActiveParticipant.obj
> Should the static building not use the Multi-threaded runtime? (/MT)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org