Qt 5 with Visual Studio 2008: crash on compile dscamerasession.cpp
-
Hi Everyone,
I have tried for one week to compile Qt 5 coming from Git with MSVC2008 on my Windows 7 machine.
After reading all documentations found on several forums and topics, an sucessfully fix some steps (ICU...), I got an error on compilation phase and I have no idea what I have to do to solve this.
@camera\dscamerasession.cpp(107) : error C2664: 'InterlockedIncrement' : cannot c
onvert parameter 1 from 'ULONG *' to 'volatile LONG *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-
style cast or function-style cast
camera\dscamerasession.cpp(112) : error C2664: 'InterlockedDecrement' : cannot c
onvert parameter 1 from 'ULONG *' to 'volatile LONG *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-
style cast or function-style cast
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0
VC\BIN\cl.EXE"' : return code '0x2'
Stop.@NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0
VC\BIN\nmake.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
@I followed carefully "this useful thread":http://stackoverflow.com/questions/15826893/building-qt5-with-visual-studio-2012-visual-studio-2013-and-integrating-with to compile but after hunting the web, I 'm running out of solution to fix my problem.
Thanks a lot for your help!
David
-
Hi David,
I compile-fixed the code by adding the "requested" reinterpret_cast calls:
@ STDMETHODIMP_(ULONG) AddRef()
{
return InterlockedIncrement(reinterpret_cast<volatile LONG*>(&m_ref));
}STDMETHODIMP_(ULONG) Release() { ULONG ref = InterlockedDecrement(reinterpret_cast<volatile LONG*>(&m_ref)); if (ref == 0) delete this; return ref; }@
This will compile, but it might crash. Atm I don't intend to find out.
-
Well, I finally deleted the qtMultimedia folder after checkout. Then I succeed to compile the rest and got a Qt5.3.2 for VS 2008 x86 with ANGLE and ICU.
I'm now fighting with Qt 5.4. Crashes in 3rdparty on "angle" folder: can't find d3d11.h in platform.h...Still searching...maybe give up in few days...
Thanks for your support
David
-
[quote author="Desch03" date="1418839877"]I'm now fighting with Qt 5.4. Crashes in 3rdparty on "angle" folder: can't find d3d11.h in platform.h...[/quote]
set include to something like
@set include=C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include;%INCLUDE%@
but i still had other problems (some file wanting stdint.h which is introduced after vs2008 so we don't have it, maybe you can replace it with boost/cstdint.hpp or something) so i had to go with
@configure ... ... ... -opengl desktop@
-
Hi Everyone,
@SGaist : yes I installed DirectX SDK and tried to compile ANGLE with my VS2008: doesn't work... On what I read, it is required to install VS2013 to compile ANGLE.
So I imagine that angle compiled with VS2013 may not work with VS2008( X86 != X64)
(that's true, I'm lazy: I don't want to spend one hour to install VS2013 Express for just compiling ANGLE)@FloGe: Well, what I don't understand: why with Qt5.3.2, it works """practically"""" like a charm, and for Qt 5.4, I need to declare a new include.
I will try your configure option "-opengl desktop" and let you known for the next crash... sure there will be one...Thank you all for your help; I 'm not alone in the dark...
David