From: mike7411 on
I'm trying to get MSMQ working in Visual C++ 6.0 without using COM.
However, whenever I include the file mq.h, I get a ton of errors:

c:\program files\microsoft visual studio\vc98\include\mq.h(139) :
error C2146: syntax error : missing ';' before identifier 'prop'
c:\program files\microsoft visual studio\vc98\include\mq.h(139) :
error C2501: 'PROPID' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\mq.h(139) :
error C2501: 'prop' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\mq.h(140) :
error C2079: 'prval' uses undefined struct 'tagPROPVARIANT'
c:\program files\microsoft visual studio\vc98\include\mq.h(146) :
error C2143: syntax error : missing ';' before '*'
c:\program files\microsoft visual studio\vc98\include\mq.h(146) :
error C2501: 'paPropRes' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\mq.h(152) :
error C2146: syntax error : missing ';' before identifier '__RPC_FAR'
c:\program files\microsoft visual studio\vc98\include\mq.h(152) :
error C2501: 'PROPID' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\mq.h(152) :
error C2143: syntax error : missing ';' before '*'
c:\program files\microsoft visual studio\vc98\include\mq.h(152) :
error C2501: '__RPC_FAR' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\mq.h(152) :
error C2501: 'aCol' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\mq.h(161) :
error C2146: syntax error : missing ';' before identifier 'propColumn'
c:\program files\microsoft visual studio\vc98\include\mq.h(161) :
error C2501: 'PROPID' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\mq.h(161) :
error C2501: 'propColumn' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\mq.h(168) :
error C2143: syntax error : missing ';' before '*'
c:\program files\microsoft visual studio\vc98\include\mq.h(168) :
error C2501: 'aCol' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\mq.h(179) :
error C2146: syntax error : missing ';' before identifier 'MSGPROPID'
c:\program files\microsoft visual studio\vc98\include\mq.h(179) :
fatal error C1004: unexpected end of file found

Any ideas what could be wrong?

Any help is appreciated. Thank you.

From: natrem on
Hi!
I don't know if it can solve your problem but I had the same error
messages with a different project.
It was ok if I just included the header file but I couldn't use it.
The problem was resolved with a forward declaration of the class I
used :

//#include "MyClass.h"
class MyClass;

With a header that does not call any method, it works
Sorry if I am of no help.


On 12 juin, 20:34, "mike7...(a)gmail.com" <mike7...(a)gmail.com> wrote:
> I'm trying to get MSMQ working in Visual C++ 6.0 without using COM.
> However, whenever I include the file mq.h, I get a ton of errors:
> c:\program files\microsoft visual studio\vc98\include\mq.h(139) :
> error C2146: syntax error : missing ';' before identifier 'prop'
> c:\program files\microsoft visual studio\vc98\include\mq.h(139) :
> error C2501: 'PROPID' : missing storage-class or type specifiers
> c:\program files\microsoft visual studio\vc98\include\mq.h(139) :
> error C2501: 'prop' : missing storage-class or type specifiers
> c:\program files\microsoft visual studio\vc98\include\mq.h(140) :
> error C2079: 'prval' uses undefined struct 'tagPROPVARIANT'
> c:\program files\microsoft visual studio\vc98\include\mq.h(146) :
> error C2143: syntax error : missing ';' before '*'
> c:\program files\microsoft visual studio\vc98\include\mq.h(146) :
> error C2501: 'paPropRes' : missing storage-class or type specifiers
> c:\program files\microsoft visual studio\vc98\include\mq.h(152) :
> error C2146: syntax error : missing ';' before identifier '__RPC_FAR'
> c:\program files\microsoft visual studio\vc98\include\mq.h(152) :
> error C2501: 'PROPID' : missing storage-class or type specifiers
> c:\program files\microsoft visual studio\vc98\include\mq.h(152) :
> error C2143: syntax error : missing ';' before '*'
> c:\program files\microsoft visual studio\vc98\include\mq.h(152) :
> error C2501: '__RPC_FAR' : missing storage-class or type specifiers
> c:\program files\microsoft visual studio\vc98\include\mq.h(152) :
> error C2501: 'aCol' : missing storage-class or type specifiers
> c:\program files\microsoft visual studio\vc98\include\mq.h(161) :
> error C2146: syntax error : missing ';' before identifier 'propColumn'
> c:\program files\microsoft visual studio\vc98\include\mq.h(161) :
> error C2501: 'PROPID' : missing storage-class or type specifiers
> c:\program files\microsoft visual studio\vc98\include\mq.h(161) :
> error C2501: 'propColumn' : missing storage-class or type specifiers
> c:\program files\microsoft visual studio\vc98\include\mq.h(168) :
> error C2143: syntax error : missing ';' before '*'
> c:\program files\microsoft visual studio\vc98\include\mq.h(168) :
> error C2501: 'aCol' : missing storage-class or type specifiers
> c:\program files\microsoft visual studio\vc98\include\mq.h(179) :
> error C2146: syntax error : missing ';' before identifier 'MSGPROPID'
> c:\program files\microsoft visual studio\vc98\include\mq.h(179) :
> fatal error C1004: unexpected end of file found
>
> Any ideas what could be wrong?
>
> Any help is appreciated. Thank you.