dcompat.h and winnt.h

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
valley
Posts: 9
Joined: Fri, 2006-07-14, 19:18

dcompat.h and winnt.h

#1 Post by valley »

Hi,

I'm having trouble in an app I'm writing. For some reason when the file dcompat.h is included (from dicom.h) I get a bunch of compile errors in VCExpress for winnt.h. The code block below shows the first few lines:

Code: Select all

c:\program files\microsoft platform sdk\include\winnt.h(894) : error C2988: unrecognizable template declaration/definition
c:\program files\microsoft platform sdk\include\winnt.h(894) : error C2059: syntax error : '('
c:\program files\microsoft platform sdk\include\winnt.h(894) : error C2090: function returns array
c:\program files\microsoft platform sdk\include\winnt.h(894) : error C2988: unrecognizable template declaration/definition
c:\program files\microsoft platform sdk\include\winnt.h(894) : error C2059: syntax error : ')'

...
Has anyone seen anything like this before? I've spent a couple of days checking compiler options for the application, and I've drawn a blank.

If I comment out the line: #include "dcmtk/dcmnet/dcompat.h" in dicom.h, everything compiles fine.

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

Hi,

I haven't seen this error before... There are many #define and #ifdef statements in dcompat.h, perhaps the compiler does not come along with this. But I think such a problem would have been reported before.

Two issues:
Be sure to include "dcmtk/config/osconfig.h" first before doing anything else in your code.
Do you encounter any problems including other header files from DCMTK?

Regards,
Michael :)

valley
Posts: 9
Joined: Fri, 2006-07-14, 19:18

#3 Post by valley »

Hi,

it actually turned out to be another library (which was mistakenly tagging along with the project). I guess the library also utilizes winsock.h which was causing problems, but they weren't manifesting in a particularly obvious manner.

:oops:

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest