title: Error with default constructor
body: <p>I post all the files of my project, It seems to be done correct, but this error is incomprensible for me... </p>
  
  <p>mainwindow.h</p>
  
  <pre><code>#ifndef MAINWINDOW_H
  #define MAINWINDOW_H
  
  #include &lt;QMainWindow&gt;
  #include &lt;activemq/library/ActiveMQCPP.h&gt;
  #include &lt;decaf/lang/Thread.h&gt;
  #include &lt;decaf/lang/Runnable.h&gt;
  #include &lt;decaf/util/concurrent/CountDownLatch.h&gt;
  #include &lt;decaf/lang/Integer.h&gt;
  #include &lt;decaf/lang/Long.h&gt;
  #include &lt;decaf/lang/System.h&gt;
  #include &lt;activemq/core/ActiveMQConnectionFactory.h&gt;
  #include &lt;activemq/util/Config.h&gt;
  #include &lt;cms/Connection.h&gt;
  #include &lt;cms/Session.h&gt;
  #include &lt;cms/TextMessage.h&gt;
  #include &lt;cms/BytesMessage.h&gt;
  #include &lt;cms/MapMessage.h&gt;
  #include &lt;cms/ExceptionListener.h&gt;
  #include &lt;cms/MessageListener.h&gt;
  #include "IfacomAmqSender.h"
  
  using namespace activemq::core;
  using namespace decaf::util::concurrent;
  using namespace decaf::util;
  using namespace decaf::lang;
  using namespace cms;
  
  namespace Ui {
  class MainWindow;
  }
  
  
  class MainWindow : public QMainWindow,public MessageListener
  {
      Q_OBJECT
  
  public:
      explicit MainWindow(QWidget *parent = 0);
      ~MainWindow();
      void onMessage(const Message*);
      void connetionSender();
  
      IfacomAmqSender m_IfacomMessageBroker;
  
  private slots:
      void on_pushButton_clicked();
  
  private:
      Ui::MainWindow *ui;
  };
  
  #endif // MAINWINDOW_H
  </code></pre>
  
  <p>mainwindow.cpp</p>
  
  <pre><code>#include "mainwindow.h"
  #include "ui_mainwindow.h"
  #include "IfacomAmqSender.h"
  #include "IfacomAmqReceiver.h"
  #include &lt;activemq/library/ActiveMQCPP.h&gt;
  #include &lt;decaf/lang/Thread.h&gt;
  #include &lt;decaf/lang/Runnable.h&gt;
  #include &lt;decaf/util/concurrent/CountDownLatch.h&gt;
  #include &lt;decaf/lang/Integer.h&gt;
  #include &lt;decaf/lang/Long.h&gt;
  #include &lt;decaf/lang/System.h&gt;
  #include &lt;activemq/core/ActiveMQConnectionFactory.h&gt;
  #include &lt;activemq/util/Config.h&gt;
  #include &lt;cms/Connection.h&gt;
  #include &lt;cms/Session.h&gt;
  #include &lt;cms/TextMessage.h&gt;
  #include &lt;cms/BytesMessage.h&gt;
  #include &lt;cms/MapMessage.h&gt;
  #include &lt;cms/ExceptionListener.h&gt;
  #include &lt;cms/MessageListener.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include &lt;qstring.h&gt;
  #include &lt;QTextStream&gt;
  #include &lt;QMessageBox&gt;
  
  
  using namespace activemq::core;
  using namespace decaf::util::concurrent;
  using namespace decaf::util;
  using namespace decaf::lang;
  using namespace cms;
  using namespace std;
  
  
  
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
  }
  
  
  
      MainWindow::~MainWindow()
  {
      delete ui;
  }
  
  void MainWindow::connetionSender()
  {
      activemq::library::ActiveMQCPP::initializeLibrary();
  
      std::string brokerURI  = "failover://(tcp://localhost:61613?wireFormat=stomp)";     // localhost;
  
      // brokerURI = "failover://(tcp://localhost:61616)";        // localhost
  
      // Queue name
      std::string destName = "IFACOM-CMS";
  
      // Queue or Topic 
      bool useTopics = false;         // true=Topic, false=Queue
  
      // SESSION_TRANSACTED or AUTO_ACKNOWLEDGE
      bool sessionTransacted = false; // if true, commit all messages
  
  
  
      // ***** Initialisation  **************************************************************
      IfacomAmqSender m_IfacomMessageBroker(brokerURI, useTopics, sessionTransacted, destName);
      m_IfacomMessageBroker.initConnection();
  
      IfacomAmqReceiver IfacomAmqReceiverBroker(brokerURI,10, useTopics, sessionTransacted, destName,2000);
      IfacomAmqReceiverBroker.initConnection();
      IfacomAmqReceiverBroker.getConsumer()-&gt;setMessageListener(this);
  
   }
  
  
      void MainWindow::on_pushButton_clicked()
      {
      //****** Send message ******************************************************
  
          //IfacomAmqSender IfacomAmqReceiverBroker;
  
      std::string text = "My IFaCOM message";
      // Customized message
      try{
          std::auto_ptr&lt;TextMessage&gt; message(m_IfacomMessageBroker.getSession()-&gt;createTextMessage(text));
          message-&gt;setCMSTimestamp(System::currentTimeMillis());
          message-&gt;setStringProperty("MyProperty", "test");
          m_IfacomMessageBroker.sendMessage(message);
  
      } catch (CMSException&amp; e) {
          e.printStackTrace();
      }
  
      // Simple text message
      m_IfacomMessageBroker.sendMessage(text);
  
      long long startTime = System::currentTimeMillis();
      long long endTime = System::currentTimeMillis();
      double totalTime = (double)(endTime - startTime) / 1000.0;
  
      // Close the connection
      m_IfacomMessageBroker.close();
  
      //ui-&gt;label-&gt;setText(QString::fromStdString(text));
  
  
      // To Do at the end
      //activemq::library::ActiveMQCPP::shutdownLibrary();
      }
  
  
  
  //***************** Receive Message  *****************************************************
  
  void MainWindow::onMessage(const Message* message) {
  
          try {
              const TextMessage* textMessage = dynamic_cast&lt;const TextMessage*&gt; (message);
              string text = "";
  
              if (textMessage != NULL) {
                  text = textMessage-&gt;getText();
              } else {
                  text = "NOT A TEXTMESSAGE!";
              }
  
              //printf("Message received: %s\n", text.c_str());
  
              //WM  get param.
              std::string msgId = message-&gt;getCMSMessageID();
              int prio = message-&gt;getCMSPriority();
              long long timestamp = message-&gt;getCMSTimestamp();
  
  
              ui-&gt;label-&gt;setText(QString::fromStdString(text));
  
          } catch (CMSException&amp; e) {
              e.printStackTrace();
          }
  
          // Commit all messages.
          /*if (this-&gt;m_sessionTransacted) {
              m_session-&gt;commit();
          }
  
          // No matter what, tag the count down latch until done.
          m_doneLatch.countDown();*/
      }
  </code></pre>
  
  <p>IfacomAmqReceiver.h</p>
  
  <pre><code>#ifndef _IfacomAmqReceiver_h
  #define _IfacomAmqReceiver_h
  #include &lt;activemq/library/ActiveMQCPP.h&gt;
  #include &lt;decaf/lang/Thread.h&gt;
  #include &lt;decaf/lang/Runnable.h&gt;
  #include &lt;decaf/util/concurrent/CountDownLatch.h&gt;
  #include &lt;decaf/lang/Integer.h&gt;
  #include &lt;decaf/lang/Long.h&gt;
  #include &lt;decaf/lang/System.h&gt;
  #include &lt;activemq/core/ActiveMQConnectionFactory.h&gt;
  #include &lt;activemq/util/Config.h&gt;
  #include &lt;cms/Connection.h&gt;
  #include &lt;cms/Session.h&gt;
  #include &lt;cms/TextMessage.h&gt;
  #include &lt;cms/BytesMessage.h&gt;
  #include &lt;cms/MapMessage.h&gt;
  #include &lt;cms/ExceptionListener.h&gt;
  #include &lt;cms/MessageListener.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  
  using namespace activemq::core;
  using namespace decaf::util::concurrent;
  using namespace decaf::util;
  using namespace decaf::lang;
  using namespace cms;
  
  class IfacomAmqReceiver : public ExceptionListener, public MessageListener{
  
  
      private:
  
      CountDownLatch m_latch;
      CountDownLatch m_doneLatch;
      Connection* m_connection;
      Session* m_session;
      Destination* m_destination;
      MessageConsumer* m_consumer;
      MessageProducer* m_producer;
      std::auto_ptr&lt;TextMessage&gt; m_message;
      long m_waitMillis;
      bool m_useTopic;
      bool m_sessionTransacted;
      std::string m_brokerURI;
      std::string m_destName;
      DeliveryMode m_message_delivery_mode;
      int m_message_priority;
      //IfacomAmqReceiver(const IfacomAmqReceiver&amp;);
      //IfacomAmqReceiver&amp; operator=(const IfacomAmqReceiver&amp;);
  
      public:
  
      IfacomAmqReceiver(const std::string&amp;, int, bool, bool, const std::string&amp;, int);
      virtual ~IfacomAmqReceiver();
      void close();
      void waitUntilReady() ;
      void cleanup();
      // MM
      void createConnection();
      void createSession();
      void createDestination();
      void createConsumer();
      void initConnection();
  
      void onMessage(const Message*);
      MessageConsumer* getConsumer();
  
      // If something bad happens you see it here as this class is also been
      // registered as an ExceptionListener with the connection.
      void onException(const CMSException&amp;);
  
  };
  
  #endif
  </code></pre>
  
  <p>IfacomAmqReceiver.cpp</p>
  
  <pre><code>#include &lt;activemq/library/ActiveMQCPP.h&gt;
  #include &lt;decaf/lang/Thread.h&gt;
  #include &lt;decaf/lang/Runnable.h&gt;
  #include &lt;decaf/util/concurrent/CountDownLatch.h&gt;
  #include &lt;decaf/lang/Integer.h&gt;
  #include &lt;decaf/lang/Long.h&gt;
  #include &lt;decaf/lang/System.h&gt;
  #include &lt;activemq/core/ActiveMQConnectionFactory.h&gt;
  #include &lt;activemq/util/Config.h&gt;
  #include &lt;cms/Connection.h&gt;
  #include &lt;cms/Session.h&gt;
  #include &lt;cms/TextMessage.h&gt;
  #include &lt;cms/BytesMessage.h&gt;
  #include &lt;cms/MapMessage.h&gt;
  #include &lt;cms/ExceptionListener.h&gt;
  #include &lt;cms/MessageListener.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include "IfacomAmqReceiver.h"
  
  using namespace activemq::core;
  using namespace decaf::util::concurrent;
  using namespace decaf::util;
  using namespace decaf::lang;
  using namespace cms;
  using namespace std;
  
  
  IfacomAmqReceiver::IfacomAmqReceiver(const std::string&amp; brokerURI, int numMessages, bool useTopic = false, bool sessionTransacted = false, const std::string&amp; destName = "IFACOM-CMS", int waitMillis = 1000) :
          m_latch(1),
          m_doneLatch(numMessages),
          m_connection(NULL),
          m_session(NULL),
          m_destination(NULL),
          m_consumer(NULL),
          m_waitMillis(waitMillis),
          m_useTopic(useTopic),
          m_sessionTransacted(sessionTransacted),
          m_destName(destName),
          m_brokerURI(brokerURI) {
      }
  
       IfacomAmqReceiver::~IfacomAmqReceiver() {
          cleanup();
      }
  
      void IfacomAmqReceiver::close() {
          this-&gt;cleanup();
      }
  
      void IfacomAmqReceiver::waitUntilReady() {
          m_latch.await();
      }
      //------ Init connexion ---------------
      void IfacomAmqReceiver::createConnection()
      {
          // Create a ConnectionFactory
          auto_ptr&lt;ConnectionFactory&gt; connectionFactory(ConnectionFactory::createCMSConnectionFactory(m_brokerURI));
  
          // Create a Connection
          m_connection = connectionFactory-&gt;createConnection();
          m_connection-&gt;start();
          m_connection-&gt;setExceptionListener(this);
      }
  
      void IfacomAmqReceiver::createSession()
      {
          // Create a Session
          if (this-&gt;m_sessionTransacted == true) {
              m_session = m_connection-&gt;createSession(Session::SESSION_TRANSACTED);
          } else {
              m_session = m_connection-&gt;createSession(Session::AUTO_ACKNOWLEDGE);
          }
      }
  
      void IfacomAmqReceiver::createDestination()
      {
          // Create the destination (Topic or Queue)
          if (m_useTopic) {
              m_destination = m_session-&gt;createTopic(m_destName);
          } else {
              m_destination = m_session-&gt;createQueue(m_destName);
          }
      }
  
      void IfacomAmqReceiver::createConsumer()
      {
          m_consumer = m_session-&gt;createConsumer(m_destination);
          //m_consumer-&gt;setMessageListener(this);
      }
  
      void IfacomAmqReceiver::initConnection() {
  
          try {
  
              createConnection();
  
              // Create the session
              createSession();
  
              // Create the destination (Topic or Queue)
              createDestination();
  
              // Create a MessageConsumer from the Session to the Topic or Queue
              createConsumer();
  
              // Indicate we are ready for messages.
              m_latch.countDown();
  
              // Wait while asynchronous messages come in.
              m_doneLatch.await(m_waitMillis);
  
          } catch (CMSException&amp; e) {
              // Indicate we are ready for messages.
              //latch.countDown();
              e.printStackTrace();
          }
      }
  
  //------ Get the message ---------------
  
          // Called from the consumer since this class is a registered MessageListener.
          void IfacomAmqReceiver::onMessage(const Message* message) {}
  
  //--------------------------------------------------
  
      // If something bad happens you see it here as this class is also been
      // registered as an ExceptionListener with the connection.
      void IfacomAmqReceiver::onException(const CMSException&amp; ex AMQCPP_UNUSED) {
          printf("CMS Exception occurred.  Shutting down client.\n");
          ex.printStackTrace();
          exit(1);
      }
  
  
  
      void IfacomAmqReceiver::cleanup() {
          if (m_connection != NULL) {
              try {
                  m_connection-&gt;close();
              } catch (cms::CMSException&amp; ex) {
                  ex.printStackTrace();
              }
          }
  
          // Destroy resources.
          try {
              delete m_destination;
              m_destination = NULL;
              delete m_consumer;
              m_consumer = NULL;
              delete m_session;
              m_session = NULL;
              delete m_connection;
              m_connection = NULL;
          } catch (CMSException&amp; e) {
              e.printStackTrace();
          }
      }
  
  
      MessageConsumer* IfacomAmqReceiver::getConsumer()
      {
          return m_consumer;
      }
  </code></pre>
  
  <p>IfacomAmqSender.h</p>
  
  <pre><code>#ifndef _IfacomAmqSender_h
  #define _IfacomAmqSender_h
  #include &lt;activemq/library/ActiveMQCPP.h&gt;
  #include &lt;decaf/lang/Thread.h&gt;
  #include &lt;decaf/lang/Runnable.h&gt;
  #include &lt;decaf/util/concurrent/CountDownLatch.h&gt;
  #include &lt;decaf/lang/Integer.h&gt;
  #include &lt;decaf/lang/Long.h&gt;
  #include &lt;decaf/lang/System.h&gt;
  #include &lt;activemq/core/ActiveMQConnectionFactory.h&gt;
  #include &lt;activemq/util/Config.h&gt;
  #include &lt;cms/Connection.h&gt;
  #include &lt;cms/Session.h&gt;
  #include &lt;cms/TextMessage.h&gt;
  #include &lt;cms/BytesMessage.h&gt;
  #include &lt;cms/MapMessage.h&gt;
  #include &lt;cms/ExceptionListener.h&gt;
  #include &lt;cms/MessageListener.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  
  using namespace activemq::core;
  using namespace decaf::util::concurrent;
  using namespace decaf::util;
  using namespace decaf::lang;
  using namespace cms;
  
  
   class IfacomAmqSender : public ExceptionListener{
  
  private:
  
      CountDownLatch m_latch;
      CountDownLatch m_doneLatch;
      Connection* m_connection;
      Session* m_session;
      Destination* m_destination;
      MessageConsumer* m_consumer;
      MessageProducer* m_producer;
      std::auto_ptr&lt;TextMessage&gt; m_message;
      long m_waitMillis;
      bool m_useTopic;
      bool m_sessionTransacted;
      std::string m_brokerURI;
      std::string m_destName;
      DeliveryMode m_message_delivery_mode;
      int m_message_priority;
  
      IfacomAmqSender(const IfacomAmqSender&amp;);
      IfacomAmqSender&amp; operator=(const IfacomAmqSender&amp;);
  
  public:
  
      IfacomAmqSender(const std::string&amp;, int, bool, bool, const std::string&amp;, int);
      IfacomAmqSender(const std::string&amp;, bool, bool, const std::string&amp;);
  
      virtual ~IfacomAmqSender();
      void close();
      void waitUntilReady();
      void cleanup();
  
      // KH
      void createConnection();
      void createSession();
      void createDestination();
      void createProducer();
      void initConnection();
  
      virtual void sendMessage(std::string);
  
      // Send a ActiveMQ Message
      virtual void sendMessage(std::auto_ptr&lt;TextMessage&gt;);
  
  
  //--------------------------------------------------
  
      // If something bad happens you see it here as this class is also been
      // registered as an ExceptionListener with the connection.
      virtual void onException(const CMSException&amp;) ;
  
      // Message Priority (0:Lowest - 9:Highest)
      void setPriority(int);
      int getPriority();
  
      // Message Delivery Mode
      void setDeliveryMode(DeliveryMode);
      DeliveryMode getDeliveryMode();
  
      Session* getSession();
  
  };
  #endif
  </code></pre>
  
  <p>IfacomAmqSender.cpp</p>
  
  <pre><code>#include &lt;activemq/library/ActiveMQCPP.h&gt;
  #include &lt;decaf/lang/Thread.h&gt;
  #include &lt;decaf/lang/Runnable.h&gt;
  #include &lt;decaf/util/concurrent/CountDownLatch.h&gt;
  #include &lt;decaf/lang/Integer.h&gt;
  #include &lt;decaf/lang/Long.h&gt;
  #include &lt;decaf/lang/System.h&gt;
  #include &lt;activemq/core/ActiveMQConnectionFactory.h&gt;
  #include &lt;activemq/util/Config.h&gt;
  #include &lt;cms/Connection.h&gt;
  #include &lt;cms/Session.h&gt;
  #include &lt;cms/TextMessage.h&gt;
  #include &lt;cms/BytesMessage.h&gt;
  #include &lt;cms/MapMessage.h&gt;
  #include &lt;cms/ExceptionListener.h&gt;
  #include &lt;cms/MessageListener.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;iostream&gt;
  #include &lt;memory&gt;
  #include "IfacomAmqSender.h"
  
  using namespace activemq::core;
  using namespace decaf::util::concurrent;
  using namespace decaf::util;
  using namespace decaf::lang;
  using namespace cms;
  using namespace std;
  
  
  
  
  
  
     IfacomAmqSender::IfacomAmqSender(const std::string&amp; brokerURI, int numMessages, bool useTopic = false, bool sessionTransacted = false, const std::string&amp; destName = "IFACOM-CMS", int waitMillis = 1000) :
          m_latch(1),
          m_doneLatch(numMessages),
          m_connection(NULL),
          m_session(NULL),
          m_destination(NULL),
          m_consumer(NULL),
          m_waitMillis(waitMillis),
          m_useTopic(useTopic),
          m_sessionTransacted(sessionTransacted),
          m_destName(destName),
          m_brokerURI(brokerURI) {
      }
  
      IfacomAmqSender::IfacomAmqSender(const std::string&amp; brokerURI, bool useTopic = false, bool sessionTransacted = false, const std::string&amp; destName = "IFACOM-CMS") :
          m_latch(1),
          m_doneLatch(1),
          m_connection(NULL),
          m_session(NULL),
          m_destination(NULL),
          m_consumer(NULL),
          m_waitMillis(1000),
          m_useTopic(useTopic),
          m_sessionTransacted(sessionTransacted),
          m_destName(destName),
          m_brokerURI(brokerURI) {
      }
  
  
       IfacomAmqSender::~IfacomAmqSender() {
          cleanup();
      }
  
      void IfacomAmqSender::close() {
          this-&gt;cleanup();
      }
  
      void IfacomAmqSender::waitUntilReady() {
          m_latch.await();
      }
  
  //------ Init connexion ---------------
  
      void IfacomAmqSender::createConnection()
      {
          // Create a ConnectionFactory
          auto_ptr&lt;ConnectionFactory&gt; connectionFactory(ConnectionFactory::createCMSConnectionFactory(m_brokerURI));
  
          // Create a Connection
          m_connection = connectionFactory-&gt;createConnection();
          m_connection-&gt;start();
          m_connection-&gt;setExceptionListener(this);
      }
  
      void IfacomAmqSender::createSession()
      {
          // Create a Session
          if (this-&gt;m_sessionTransacted == true) {
              m_session = m_connection-&gt;createSession(Session::SESSION_TRANSACTED);
          } else {
              m_session = m_connection-&gt;createSession(Session::AUTO_ACKNOWLEDGE);
          }
      }
  
      void IfacomAmqSender::createDestination()
      {
          // Create the destination (Topic or Queue)
          if (m_useTopic) {
              m_destination = m_session-&gt;createTopic(m_destName);
          } else {
              m_destination = m_session-&gt;createQueue(m_destName);
          }
      }
  
      void IfacomAmqSender::createProducer()
      {
          m_producer = m_session-&gt;createProducer(m_destination);
          m_producer-&gt;setDeliveryMode(DeliveryMode::NON_PERSISTENT);
      }
  
      void IfacomAmqSender::initConnection() {
  
          try {
  
              createConnection();
  
              // Create the session
              createSession();
  
              // Create the destination (Topic or Queue)
              createDestination();
  
              // Create a MessageProducer from the Session to the Topic or Queue
              createProducer();
              m_producer-&gt;setDeliveryMode(DeliveryMode::NON_PERSISTENT);
  
              // Indicate we are ready for messages.
              m_latch.countDown();
  
              // Wait while asynchronous messages come in.
              m_doneLatch.await(m_waitMillis);
  
          } catch (CMSException&amp; e) {
              // Indicate we are ready for messages.
              //latch.countDown();
              e.printStackTrace();
          }
      }
  
  
      void IfacomAmqSender::sendMessage(string text) {
              try {
  
          std::auto_ptr&lt;TextMessage&gt; message(m_session-&gt;createTextMessage(text));
              // to set a property
              ////message-&gt;setIntProperty("Integer", ix);
          m_producer-&gt;send(message.get());
          message-&gt;setCMSTimestamp(System::currentTimeMillis());
  
          } catch (CMSException&amp; e) {
              e.printStackTrace();
          }
      }
  
  
      // Send a ActiveMQ Message
      void IfacomAmqSender::sendMessage(std::auto_ptr&lt;TextMessage&gt; amq_message) {
          try {
  
              amq_message-&gt;setCMSTimestamp(System::currentTimeMillis());
              m_producer-&gt;send(amq_message.get());
  
          } catch (CMSException&amp; e) {
              e.printStackTrace();
          }
      }
  
  //--------------------------------------------------
  
      // If something bad happens you see it here as this class is also been
      // registered as an ExceptionListener with the connection.
      void IfacomAmqSender::onException(const CMSException&amp; ex AMQCPP_UNUSED) {
          printf("CMS Exception occurred.  Shutting down client.\n");
          ex.printStackTrace();
          exit(1);
      }
  
      // Message Priority (0:Lowest - 9:Highest)
      void IfacomAmqSender::setPriority(int priority){m_message_priority = priority;}
      int IfacomAmqSender::getPriority(){return m_message_priority;}
  
      // Message Delivery Mode
      void IfacomAmqSender::setDeliveryMode(DeliveryMode delivery_mode){m_message_delivery_mode = delivery_mode;}
      DeliveryMode IfacomAmqSender::getDeliveryMode(){return m_message_delivery_mode;}
  
      Session* IfacomAmqSender::getSession()
      {
          return m_session;
      }
  
  
      void IfacomAmqSender::cleanup() {
          if (m_connection != NULL) {
              try {
                  m_connection-&gt;close();
              } catch (cms::CMSException&amp; ex) {
                  ex.printStackTrace();
              }
          }
  
          // Destroy resources.
          try {
              delete m_destination;
              m_destination = NULL;
              delete m_consumer;
              m_consumer = NULL;
              delete m_session;
              m_session = NULL;
              delete m_connection;
              m_connection = NULL;
          } catch (CMSException&amp; e) {
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p>main.cpp</p>
  
  <pre><code>#include "ifacomamqsender.h"
  #include "mainwindow.h"
  #include &lt;QApplication&gt;
  
  int main(int argc, char *argv[])
  {
      QApplication a(argc, argv);
      MainWindow w;
      w.show();
  
      return a.exec();
  }  
  </code></pre>
  
  <p>and the error is:</p>
  
  <pre><code>Error   29  error C2512: 'IfacomAmqSender' : no appropriate default constructor available       42  1   GUI-CMS
  </code></pre>