activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Pechorin <ivan.pecho...@gmail.com>
Subject Re: Problem using ActiveMQ-CPP interfaces where std::string are used as parameters
Date Thu, 15 Dec 2011 06:11:57 GMT
2011/12/14 mikmela <mikmela@yahoo.com>:
> I'm having a lot of issues passing std::strings into ActiveMQ-CPP interfaces,
> i.e. Connection, Session, Message and etc.
> Even though I'm using MS VS2010 to build both activemq-cpp dll and my
> application with the same version of multithreaded c-runtime dll
> MSVCP100.dll, MSVCR100.dll(/MD) , string object passed from the app to
> activevemq-cpp dll looks corrupted in debugger when I step into activemq-cpp
> code...
> I'm wondering if anyone else experienced this issue...

I suggest to change #define _SECURE_SCL from 1 to 0 in the following 2 files:

src\main\activemq\util\Config.h:
src\main\decaf\util\Config.h:

This is the only change I remember required when using ActiveMQ-CPP
3.4.x with MS VS2010.

_SECURE_SCL is defined to 1 by default in VS2005 and VS2008, but this
was changed and VS2010 defines it to 0 by default.

Compare the first paragraph in the following pages:
http://msdn.microsoft.com/en-us/library/aa985896(v=VS.90).aspx
http://msdn.microsoft.com/en-us/library/aa985896(v=VS.100).aspx

Mime
View raw message