I used CMake 2.8.0, and I select DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS
DCMTK_WITH_DOXYGEN, DCMTK_WITH_THREADS.
I used Visual C++ 6.0.
I try to compile DCMTK and I have the following error :
Code: Select all
dcmtk-3.6.0\oflog\libsrc\winsock.cc(57) : error C2664: 'InterlockedCompareExchange' : cannot convert parameter 1 from 'void ** ' to 'volatile long *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Code: Select all
#ifdef HAVE_OLD_INTERLOCKEDCOMPAREEXCHANGE
void *tmp = ::InterlockedCompareExchange(OFreinterpret_cast(void **, p),
OFreinterpret_cast(void *, comp), OFreinterpret_cast(void *, set));
ret = OFreinterpret_cast(LONG, tmp);
#else
ret = ::InterlockedCompareExchange(p, comp, set);
#endif
I commented out :
//#define HAVE_OLD_INTERLOCKEDCOMPAREEXCHANGE
and compilation went OK !
What is wrong ? Do I made a mistake ?
Thanks in advance for your anwser.