Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Qt 5 with Visual Studio 2008: crash on compile dscamerasession.cpp

    Installation and Deployment
    2
    5
    3412
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Desch03 last edited by

      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

      1 Reply Last reply Reply Quote 0
      • F
        FloGe last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • D
          Desch03 last edited by

          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

          1 Reply Last reply Reply Quote 0
          • F
            FloGe last edited by

            [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@

            1 Reply Last reply Reply Quote 0
            • D
              Desch03 last edited by

              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

              1 Reply Last reply Reply Quote 0
              • First post
                Last post