RFA C++ NON OMM Windows Compatibility:

mark2.davis
mark2.davis Newcomer

I am upgrading an application that currently uses NON OMM RFA compiled with Visual Studio 2010. The application is statically linked. We have updated to Visual Studio 2017 and I have downloaded the 7.6.2 Static kit, but during linking I am getting errors that indicate that libRFA7_140.lib is using RuntimeLibrary MD_DynamicRelease even when I specify _RFA_STATIC_BUILD_.

I have a couple of questions.

1. What is the latest version to support NON OMM, from the compatibility Matrix this is mentioned on the Operating System tab but NOT on the compiler tab, would be good for clarification.
2. Should this work, do I need a lower version, but really need a minimum of VS2015 for binary compatibility during static linking.

Regard, Mark.

Tagged:

Best Answer

  • Hi @mark2.davis,

    RFA supports only the /MD and /MDd compiler options which uses DLL-specific version of the run-time library. I have tried to build the RFASTTicker on VS2010 with /MT and got build error.

    Below is the related information in Readme file.

    6.1.1 C Run-Time Libraries and RFA

    RFA DLLs are linking to the Multi-threaded DLL version of C Run-Time
    Library (CRT) and Standard C++ Library, which the compiler option is /MD,
    so the RFA6.x Windows application MUST use the /MD compiler option in the
    project setting. If different compiler options are specified, such as
    /MDd, /MT, MTd, /ML and MLd, users will encounter issues with mismatched
    CRTs and need to rebuild application with /MD option. To prevent an
    inclusion of the debug versions of the Multi-threaded DLL the following
    Microsoft libraries must be linked in

    MSVCRT.LIB


    MSVCPRT.LIB

    The following Link options should also be used:

    /nodefaultlib:"MSVCRTd.LIB"


    /nodefaultlib:"MSVCPRTd.LIB"


    Starting with the RFA C++ 7.2 release, Debug versions of the RFA libraries
    built with /MDd are included in the distribution.

Answers

  • libRFA7_140.lib(Exception.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease'

  • Hi @mark2.davis

    Officially RFA v7.6.2.E4 supports VS 2015 as the latest version.

    I did just try building one of the legacy examples (RFASTTicker) from the above static SDK using VS2017 (after answering yes to the upgrade questions) and linked OK - but this is not supported.

  • Many thanks,

    I have tried the example but the Runtime Library is set to /MD(d) in RFASTicker example so that is going to dynamically link. When I change to static linking as we are using in our project we see the same issue /MT(d)

    1>msvcprtd.lib(locale0_implib.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in Clients.obj.

    I could be missing something here ?

    What seems to be mysterious is the following, there seems to be something interfering with the _RFA_STATIC_BUILD_ setting. The dynamic link issue only appears post _MSC_VER 1600.

    In terms of an investigation I try linking a few different options

    VS2010 lib
    1>libRFA7_100.lib(Exception.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1600' doesn't match value '1900' in Admin.obj


    VS2013 lib
    1>libRFA7_120.lib(Exception.obj) : error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1900' in Admin.obj 1>libRFA7_120.lib(Exception.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MDd_DynamicDebug' doesn't match value 'MTd_StaticDebug' in Admin.obj

    I also went back to VS2010 and built against V100 version in 7.6.2 without issue.

  • Many thanks,

    I was consulting the RFA C++ Project Settings tutorial

    https://developers.refinitiv.com/thomson-reuters-enterprise-platform/robust-foundation-api-rfa/learning?content=5254&type=learning_material_item

    Wondered what difference the _RFA_STATIC_BUILD_ and static subdirectory make to the build settings ?
  • @mark2.davis

    The libraries in Static subdirectory with RFA_STATIC_BUILD means application statically is linked to RFA library at compile time. However, with /MD(d) compiler options, application and RFA library still dynamically are linked to DLL-specific version of C/C++ run-time Library.

    Hope this helps.