PDA

View Full Version : Rebuild Qt 4.3.4 with MS VS 2015



pelumu
29th March 2016, 09:09
Hi,

I need to rebuild my Qt 4.3.4 with MS Visual Studio 2015. I get the following error building qtmain_win.cpp:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\intrin.h(200): error C2059: Syntaxfehler: "reinterpret_cast"

Google didn't help me.

Any ideas?

Best regards,
Peter

retep
22nd July 2016, 14:48
Do you have a solution, i'm running into the same problem ...

Best regards
(also a) Peter

pelumu
23rd July 2016, 17:19
Hello Peter,

Yes, I habe a solution. I'll write it here when I am back from holiday end of next week.

Kind regards
Peter

pelumu
5th August 2016, 10:58
Hi Peter,

sorry for my late answer.

I have checked my sources WinDiff and the only change I did should be the following lines in src\corelib\arch\qatomic_windows.h:

// Abfrage darf ab VS 2015 nicht mehr sein
//# ifndef _M_IX86
extern "C" {
void *_InterlockedCompareExchangePointer(void * volatile *, void *, void *);
void *_InterlockedExchangePointer(void * volatile *, void *);
}
# pragma intrinsic (_InterlockedCompareExchangePointer)
# pragma intrinsic (_InterlockedExchangePointer)
//# else
//# define _InterlockedCompareExchangePointer(a,b,c) \
// reinterpret_cast<void *>(_InterlockedCompareExchange(reinterpret_cast<volatile long *>(a), reinterpret_cast<long>(b), reinterpret_cast<long>(c)))
//# define _InterlockedExchangePointer(a, b) \
// reinterpret_cast<void *>(_InterlockedExchange(reinterpret_cast<volatile long *>(a), reinterpret_cast<long>(b)))
//# endif

If you get still errors please contact me here again. Perhaps I can remeber to other changes when I see your errors.

Kind regards,
Peter