activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Pechorin <>
Subject Re: _ITERATOR_DEBUG_LEVEL error when linking with libactivemq-cpp.lib
Date Thu, 29 Dec 2011 10:35:55 GMT
2011/12/29 Bill Moo <>:
> I have build myself a libactivemq-cpp.lib file (525MB) from source using
> Visual Studio 2010 (x64) and the Release-SSL configuration and I now want
> to make use of it in my test program. I am trying to build a test
> application using Qt with the MSVC 10.0 (amd64) toolchain, but when I build
> aside from some 40 C4100 "unreferenced formal parameter" messages I get
> over 200 variations of this :
> libactivemq-cpp.lib(ActiveMQCPP.obj) : error LNK2038: mismatch detected for
> '_ITERATOR_DEBUG_LEVEL': value '1' doesn't match value '0' in main.obj
> errors

The reason for the problem is _SECURE_SCL defined to 1 in two places
within activemq-cpp: src\main\activemq\util\Config.h and
src\main\decaf\util\Config.h. You should change it to 0 if you build
with MSVC2010. I'll provide a patch soon to eliminate this issue.

> and quite a few LNK2001 "unresolved externals" including
> __imp_WSACleanup, __imp_WSAStartup, apr_uuid_get, ...

It seems like you've build ActiveMQ-C++ static library and now trying
to link it statically to your application.
In this case you should also add the following libraries when linking
your application: Ws2_32.lib, libapr-1.lib and maybe even
libaprutil-1.lib and libapriconv-1.lib.
(Linker -> Input -> Additional dependencies)

View raw message