activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oscar Pernas <os...@pernas.es>
Subject ACTIVEMQ-CPP Error compiling with windows.h header included in the project
Date Tue, 25 Jan 2011 10:57:13 GMT
Hi all,


Im using ActiveMQ-CPP in a dll using windows XP. When I was trying to
compile my library (that uses activemq-cpp), I was always having  error
C2059: syntax error : 'constant' in thread.h class of decaf/lang.
I was looking for a solution and I saw that the constant was defined in
winspool.h

Thread.h
static const int MIN_PRIORITY = 1;

winspool.h
 #define MAX_PRIORITY 99
#define MIN_PRIORITY  1

This #define causes the compilation error. To fix that, I've set in activemq
sources the const name to (same but with underscore):

        /** The minimum priority that a thread can have. */
        static const int _MIN_PRIORITY = 1;

        /** The maximum priority that a thread can have. */
        static const int _MAX_PRIORITY = 10;


The compilation works now, I'm missunderstanding something? it is a good
solution?

regards

-- 
Óscar Pernas Plaza.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message