C++ Debugging Setup



  • Hi.

    I compiled the sdk on Windows and my plugin for R21 in standard configuration according to the documentation. Now I'd like to be able to press "Debug" in VC++ and have it compile and run C4D.exe just like before R20. At the moment the sdk/plugins folder is not the plugins folder so C4D won't load the plugin.
    How do I have to set it up so I can compile in the plugins folder? I'm a bit intimidated by the new dependencies, frameworks, solutions, projectfiles, projectdefinitions, configurations and stuff. I hope it is just setting the plugin path in CInema.
    Additionally, where in VC++ do I have to link the C4D.exe? In the "Debugging" section of the project file?

    Thanks a lot.



  • Hello,
    I've marked your thread as a question, be sure to change it to solved (information here)

    About your question, we have the information you asked on this manual.

    But there's always room to improve so let us know if something is still not clear.

    Cheers,
    Manuel



  • @m_magalhaes said in C++ Debugging Setup:

    But there's always room to improve so let us know if something is still not clear.

    Thanks. Your link states: "The plugin location can be set with the g_additionalModulePath command line argument."
    Where and how do I use it exactly? Using it in an alias of the C4D.exe lets me start Cinema and it finds the plugin but VC++ doesn't accept aliases and converts the path to the target .exe. Forcing the link leads to an error. When using g_additionalModulePath in VC++ directly it complains about the syntax.



  • hi,

    in Visual Studio, on the properties, below the line Command you have Command Arguments
    so in
    command : D:\my\path\to\cinema4D\Cinema 4D.exe
    Command Arguments : -g_alloc=debug -g_additionalModulePath ="D:\SDK\R21\MyProject\Plugins"

    Cheers,
    Manuel



  • Thanks again. This works now but one last thing. It now triggers a stop on startup. Can I safely uncheck stopping for this kind of exception?



  • hello,

    We need to ask if you are compiling the SDK, your own project, etc.
    Different question, you should open a different thread :)
    It will help other people to find the thread.

    Cheers,
    Manuel