Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    VS 2015 Update 3 Compiler changes

    General Discussion
    0
    13
    3.1k
    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.
    • H
      Helper
      last edited by

      On 25/07/2016 at 01:27, xxxxxxxx wrote:

      Ok, thanks for the heads up.

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 26/07/2016 at 04:38, xxxxxxxx wrote:

        Hey @mp5gosu,

        did you get errors like these?

        6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1651) : error C3861: 'typeof': identifier not found (compiling source file Source\BerconNoise\BerconNoiseShader.cpp)
        6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1589) : error C3861: 'typeof': identifier not found (compiling source file Source\BerconNoise\BerconGradShader.cpp)
        6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1651) : error C3861: 'typeof': identifier not found (compiling source file Source\AproxGL.cpp)
        6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1651) : error C2974: '__vcrt_va_start_verify_argument_type': invalid template argument for '_Ty', type expected (compiling source file Source\BerconNoise\BaseVRayShader.cpp)
        6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1651) : error C2672: '__vcrt_va_start_verify_argument_type': no matching overloaded function found (compiling source file Source\BerconNoise\BerconNoiseShader.cpp)
        6>f:\microsoft visual studio\vs15preview\common7\ide\vc\include\vadefs.h(143) : note: see declaration of '__vcrt_va_start_verify_argument_type' (compiling source file Source\BerconNoise\BaseVRayShader.cpp)
        6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1589) : error C2672: '__vcrt_va_start_verify_argument_type': no matching overloaded function found (compiling source file Source\BerconNoise\BerconGradShader.cpp)
        6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1724) : error C3861: 'typeof': identifier not found (compiling source file Source\AixTeapot\TeaPot.cpp)
        6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1651) : error C2672: '__vcrt_va_start_verify_argument_type': no matching overloaded function found (compiling source file Source\AproxGL.cpp)
        6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1676) : error C3861: 'typeof': identifier not found (compiling source file Source\BakeShader.cpp)
        

        I also tried upgrading to Upgrade 3, but the upgrade process somehow failed and I get the compilation
        errors above. I tried reinstalling VS 2015 without Upgrade 3 with no success (setup always fails).
        How did you downgrade to Update 2?

        -Niklas

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 26/07/2016 at 07:20, xxxxxxxx wrote:

          Yes, those are exactly the compiler errors.

          But on my side, VS upgraded just fine.
          Even projects that are not C4D-related compile well.

          I simply re-installed VS2015.2. (make settings backup, uninstall VS completely or try running the 2015.2 installer and hit "modify").

          (Un-)Installing VS is already a mess, there are often lots of leftovers around your hard drives that have to be cleaned manually. And by the way, make sure you do any VS operation with permissive rights.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 26/07/2016 at 08:39, xxxxxxxx wrote:

            Originally posted by xxxxxxxx

            Hey @mp5gosu,
            did you get errors like these?

            6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1651) : error C3861: 'typeof': identifier not found (compiling source file Source\BerconNoise\BerconNoiseShader.cpp)[/DIV][DIV]6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1589) : error C3861: 'typeof': identifier not found (compiling source file Source\BerconNoise\BerconGradShader.cpp)[/DIV][DIV]6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1651) : error C3861: 'typeof': identifier not found (compiling source file Source\AproxGL.cpp)[/DIV][DIV]6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1651) : error C2974: '__vcrt_va_start_verify_argument_type': invalid template argument for '_Ty', type expected (compiling source file Source\BerconNoise\BaseVRayShader.cpp)[/DIV][DIV]6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1651) : error C2672: '__vcrt_va_start_verify_argument_type': no matching overloaded function found (compiling source file Source\BerconNoise\BerconNoiseShader.cpp)[/DIV][DIV]6>f:\microsoft visual studio\vs15preview\common7\ide\vc\include\vadefs.h(143) : note: see declaration of '__vcrt_va_start_verify_argument_type' (compiling source file Source\BerconNoise\BaseVRayShader.cpp)[/DIV][DIV]6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1589) : error C2672: '__vcrt_va_start_verify_argument_type': no matching overloaded function found (compiling source file Source\BerconNoise\BerconGradShader.cpp)[/DIV][DIV]6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1724) : error C3861: 'typeof': identifier not found (compiling source file Source\AixTeapot\TeaPot.cpp)[/DIV][DIV]6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1651) : error C2672: '__vcrt_va_start_verify_argument_type': no matching overloaded function found (compiling source file Source\AproxGL.cpp)[/DIV][DIV]6>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\corecrt_wstdio.h(1676) : error C3861: 'typeof': identifier not found (compiling source file Source\BakeShader.cpp)
            

            I also tried upgrading to Upgrade 3, but the upgrade process somehow failed and I get the compilation
            errors above<span style="line-height: 1.4;">. I tried reinstalling VS 2015 without Upgrade 3 with no success (setup always fails).</span>
            <span style="line-height: 1.4;">How did you downgrade to Update 2?</span>
            -Niklas

            If memory serves me well typeof was either a GCC extension only or a C language keyword (maybe also in boost, but I would have to look at).

            My sus**cion would be that the libs either have problems recognizing (or handling) a newer compiler version (number) or running into a problem where they are defaulting to the GCC code path.

            I'd check for big 3rd party libs/frameworks like Boost or usage of compiler features we don't recommend too...

            Best regards,

            Wilfried

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              On 28/07/2016 at 23:03, xxxxxxxx wrote:

              Yes, turned out that 'typeof' caused the issue. This is indeed a GCC extension. Using decltype should solve the issue.

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

                On 08/08/2016 at 18:01, xxxxxxxx wrote:

                CINEMA 4D R15\resource\_api\c4d_misc\utilities\compilerdetection.h

                Add:

                #define _HAS_NOEXCEPT
                

                at line 62.

                To get it compiling with vs2015 update 3.

                Not sure which line in later versions. Where the windows compiler detection stuff goes.

                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

                  On 09/08/2016 at 06:14, xxxxxxxx wrote:

                  Thanks fused!

                  That helps a lot. 🙂

                  edit: Although not that good to mess with the framework. 
                  Hope, that Maxon will have that on the radar for future updates.

                  1 Reply Last reply Reply Quote 0
                  • H
                    Helper
                    last edited by

                    On 09/08/2016 at 06:30, xxxxxxxx wrote:

                    If you feel bad messing with the api, you can also put _HAS_NOEXCEPT in the preprocessor defs for the framework and you plugin.

                    1 Reply Last reply Reply Quote 0
                    • H
                      Helper
                      last edited by

                      On 09/08/2016 at 18:11, xxxxxxxx wrote:

                      For R16

                      in CINEMA 4D R16\frameworks\cinema.framework\source\c4d_misc\utilities\compilerdetection.h

                      around line 89:

                      #if _MSC_VER < 1800   
                           #define _HAS_DECLTYPE   
                      #endif
                      

                      Make sure it says this instead:

                      #define _HAS_NOEXCEPT   
                      #define _HAS_DECLTYPE
                      

                      R17 is probably similar. I'll get to that soon.

                      1 Reply Last reply Reply Quote 0
                      • H
                        Helper
                        last edited by

                        On 28/08/2016 at 00:56, xxxxxxxx wrote:

                        Thanks for the hints. It would have taken me a long time to make sense of the errors.

                        I want to add that in R17 I had to add the defines
                        _HAS_EXCEPTIONS=0
                        _HAS_DECLTYPE

                        Edit: Same for R18

                        1 Reply Last reply Reply Quote 0
                        • H
                          Helper
                          last edited by

                          On 09/11/2016 at 08:27, xxxxxxxx wrote:

                          Originally posted by xxxxxxxx

                          If memory serves me well typeof was either a GCC extension only or a C language keyword (maybe also in boost, but I would have to look at).

                          My sus**cion would be that the libs either have problems recognizing (or handling) a newer compiler version (number) or running into a problem where they are defaulting to the GCC code path.

                          I'd check for big 3rd party libs/frameworks like Boost or usage of compiler features we don't recommend too...

                          Best regards,

                          Wilfried

                          As a followup, I just want to note where the typeof issue came from in compilerdetection.h

                          #ifndef _HAS_DECLTYPE
                          	// try the GCC extension typeof
                          	#define decltype typeof
                          #endif
                          

                          Setting _HAS_DECLTYPE and _HAS_EXCEPTIONS=0 in the preprocessor macros works for me too.

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