Hello,
I'm writing a short proof of concept project in C++ to test message consumption 
through qpidmessaging. When compiling it fails with Link Error 2001 looking for 
qpid::types::Variant. If I don't use certain methods that apparently do not 
reference this class it works fine. I have added the qpid definition 
(qpid-cpp-master\include) and implementation (qpid-cpp-master\src) locations to 
the Include and Source directories in the project properties, respectively. My 
code:

#include "stdafx.h"
#include <qpid/messaging/Connection.h>#include 
<qpid/messaging/Message.h>#include <qpid/messaging/Receiver.h>#include 
<qpid/messaging/Session.h>
#include <iostream>
using namespace std;using namespace qpid::messaging;

int main() {
 Connection connection; connection.open(); Session session = 
connection.createSession(); Receiver receiver = 
session.createReceiver("lnl.og.replicator-credential-transaction.processqueue_2;
  {mode: browse}");
 Message response = receiver.fetch(); // Message.getContentObject() next causes 
Link error 2001:        // error LNK2001 : unresolved external symbol 
"__declspec(dllimport) class std::basic_ostream<char,struct 
std::char_traits<char> > & __cdecl qpid::types::operator<<(class 
std::basic_ostream<char,struct std::char_traits<char> > &,class 
qpid::types::Variant const &)"(__imp_ ? ? 
6types@qpid@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV23@ABVVariant@01@@Z)
 // If I use response.getContent() instead there is no problem.       cout << 
response.getContentObject() << endl; connection.close(); return 0;}

Qpic Messaging API 1.39.0Visual Studio 2015
I would greatly appreciate any suggestions on how to overcome this.

Regards, Michael.




Reply via email to