Uploaded image for project: 'fix8'
  1. fix8
  2. FX-204

Remove public static vars from generated code

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      Win8.1 x64 vs2013

      Description

      Remove public static vars from generated code. That causes link error sometimes:

      3>orderadaptor.lib(lmax_or_traits.obj) : error LNK2005: "public: static unsigned short const FIX8::LMAX_OR_FIX44::TradeCaptureReportRequest::NoDates::_fnum" (?_fnum@NoDates@TradeCaptureReportRequest@LMAX_OR_FIX44@FIX8@@2GB) already defined in orderadaptor.lib(lmax_fix8orderadaptor.obj)
      3>orderadaptor.lib(lmax_or_traits.obj) : error LNK2005: "public: static unsigned short const FIX8::LMAX_OR_FIX44::TradeCaptureReport::NoSides::_fnum" (?_fnum@NoSides@TradeCaptureReport@LMAX_OR_FIX44@FIX8@@2GB) already defined in orderadaptor.lib(lmax_fix8orderadaptor.obj)
      

      The code

            static const unsigned short _fnum = 580;
      

      can be replaced by

            enum XXX { _fnum = 580; };
      

      or

            inline static const unsigned short _fnum() { return 580; }
      

        Attachments

          Activity

            People

            • Assignee:
              syegres Sergey Sedreev
              Reporter:
              syegres Sergey Sedreev
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Who's Looking?