0

I added a custom field in FIX50SP2.xml and also included this field in the ExecutionReport message. Then I ran "Generator.rb" followed by "generator_c++.sh".

Included below is the src/fix42/Logon.h file that was generated. There are some extra ", [, and ] characters on the lines marked "<------------" on the right. This causes compilation to fail.

I don't know enough Ruby to get rid of these extra characters. Can anyone please help? Platform is Linux/C++.

#ifndef FIX42_LOGON_H
#define FIX42_LOGON_H

#include "Message.h"

namespace FIX42
{

  class Logon : public Message
  {
  public:
    Logon() : Message(MsgType()) {}
    Logon(const FIX::Message& m) : Message(m) {}
    Logon(const Message& m) : Message(m) {}
    Logon(const Logon& m) : Message(m) {}
    static FIX::MsgType MsgType() { return FIX::MsgType("A"); }

    Logon(
      ["const FIX::EncryptMethod& aEncryptMethod"],          <------------------
      ["const FIX::HeartBtInt& aHeartBtInt"] )               <------------------
    : Message(MsgType())
    {
      set(aEncryptMethod);
      set(aHeartBtInt);
    }

    FIELD_SET(*this, FIX::EncryptMethod);
    FIELD_SET(*this, FIX::HeartBtInt);
    FIELD_SET(*this, FIX::RawDataLength);
    FIELD_SET(*this, FIX::RawData);
    FIELD_SET(*this, FIX::ResetSeqNumFlag);
    FIELD_SET(*this, FIX::MaxMessageSize);
    FIELD_SET(*this, FIX::NoMsgTypes);
    class NoMsgTypes: public FIX::Group
    {
    public:
    ["NoMsgTypes() : FIX::Group(384,372,FIX::message_order("]["372,"]["385,"]0)) {}  <---------
      FIELD_SET(*this, FIX::RefMsgType);
      FIELD_SET(*this, FIX::MsgDirection);
    };
  };

}

#endif
Prasoon Tiwari
  • 840
  • 2
  • 12
  • 23
  • The logon.h is not Ruby, it's C++. Are you saying that if you remove the custom field in FIX50SP2.xml and run the generators you get no errors? – rupweb Dec 18 '14 at 12:39

1 Answers1

0

The problem is with a few print statements in GeneratorCPP.rb. Replacing them with puts fixes the problem. See http://sourceforge.net/p/quickfix/mailman/message/32256133/ for details.

Prasoon Tiwari
  • 840
  • 2
  • 12
  • 23