Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    compiling with nvcc compiler in VS2010

    SDK Help
    0
    7
    530
    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 14/11/2013 at 16:30, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   13 
      Platform:      
      Language(s) :     C++  ;

      ---------
      well , I'm trying to compile my project using nvcc compiler "nvidia compiler to compile CUDA"

      normally in any project the Nvidia CUDA can compile any .cu file "containing any C++ data"

      so it is like:
      nvcc myfile.cu -o myfile

      2 things happened:
      after a long testing , it compiled with a very lot of warnings , most of them in valotile and enums in c4d_gui.h and some other files, but simply cinema4d didn't start.... "hanged in plugin initialization"

      also if I include "cuda.h" after "c4d.h" it doesn't compile

      thanks

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

        On 14/11/2013 at 23:15, xxxxxxxx wrote:

        Compile your .cu files with the CUDA compiler, .cpp files with MSVC. The linker will do the rest.

        Best,
        -Niklas

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

          On 15/11/2013 at 02:47, xxxxxxxx wrote:

          I did that , but what I need to know which dependencies are done in the c4d SDK project , as what I did is copy processor definitions from C/C++ to CUDA C/C++ as it was raising "can't find c4d.h , can't find pthread.h ... and so on"

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

            On 15/11/2013 at 03:32, xxxxxxxx wrote:

            here is the problematic warning!!
            warning MSB8012: TargetPath(D:\MAXON\c4dr13\plugins\cinema4dsdk\\cinema4dsdk.dll) does not match the Linker's OutputFile property value (D:\MAXON\c4dr13\plugins\cinema4dsdk\cinema4dsdk.cdl64). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).

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

              On 15/11/2013 at 03:46, xxxxxxxx wrote:

              I fixed this warning by changing target extension from .dll to .cdl64 , but still cinema4d hangs once it tries to load the plugin

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

                On 15/11/2013 at 03:51, xxxxxxxx wrote:

                all warnings now of this kind:
                 warning : multicharacter character literal (potential portability problem

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

                  On 16/11/2013 at 06:58, xxxxxxxx wrote:

                  well the only solution was to separate cuda.h from c4d.h , and everything is fine now 🙂

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