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
    • Register
    • Login

    Issue: CommandData Plugin Compilation Errors in Cinema 4D 2025.1.0 SDK

    Cinema 4D SDK
    windows 2025 c++
    3
    3
    110
    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.
    • S
      skibinvitaliy
      last edited by

      Hi.
      I'm new to this field, so don't judge me too harshly.
      I am trying to create a simple CommandData plugin for Cinema 4D 2025.1.3 following the SDK documentation.
      However, I am encountering multiple compilation errors, despite the fact that all example projects from the SDK compile and work correctly.

      Errors:
      Here are some of the main errors I'm facing:
      C2504: 'CommandData': base class undefined
      C2086: 'int Bool': redefinition
      C3646: 'Execute': unknown override specifier
      C2065: 'GeDialog': undeclared identifier
      C2065: 'BaseDocument': undeclared identifier
      C2096: 'Bool': A data member cannot be initialized with a parenthesized initializer

      What I Have Checked:
      All SDK example projects compile successfully.
      My project is in the same solution as the example projects.
      I'm using Visual Studio 2019 with /std:c++17, as recommended in the SDK.
      The SDK headers and libraries are correctly linked.
      CommandData should be defined in c4d_commanddata.h, but the compiler doesn't recognize it.

      Question:
      Has something changed in how CommandData plugins should be structured in Cinema 4D 2025?
      Do I need to include additional headers or modify my implementation?
      Any guidance or better tutorial would be greatly appreciated.
      TIA

      Windows 11/64, VS 2019, SDK 2025_1_0, Cinema 4D 20251.3

      S 1 Reply Last reply Reply Quote 0
      • S
        spedler @skibinvitaliy
        last edited by

        Hi @skibinvitaliy
        There's a few things to watch out for here. First, you will need to include at the very least the file c4d.h from the framework, if this is missing that might account for the undeclared identifiers.

        Assuming you're doing that, you must either use the cinema namespace or specifically qualify function declarations etc. If you don't, the compiler won't recognise the C4D functions and objects as valid. The manual explains how to do this, it's not difficult - just an extra step to take which I keep forgetting because it's new to R2025.

        The error 'int Bool' redefinition is because what it looks like you're doing there is declaring a variable named 'Bool' to be of type 'int'. But 'Bool' cannot be a variable, it's a variable type (actually a typedef defined by the SDK) so the compiler thinks you are redefining it, which isn't allowed.

        These are all just guesses though without seeing any code, but the first thing to look at is the namespace. Catches me out every time.

        Steve

        ferdinandF 1 Reply Last reply Reply Quote 1
        • ferdinandF
          ferdinand @spedler
          last edited by ferdinand

          Hey @skibinvitaliy,

          Welcome to the Maxon developers forum and its community, it is great to have you with us!

          Getting Started

          Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules.

          • Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment.
          • Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support.
          • Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads.

          It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: How to Ask Questions.

          About your First Question

          No one is judging you here, problems are part of the game and what we are here for to help with 🙂 . But please familiarize yourself with our forum rules, such question should be accompanied by example code and the version you are migrating from, as we otherwise mostly have to guess what is going wrong.

          I am assuming you are migrating from a pre-2025 SDK, that is at least what your errors imply. With 2025 we introduced our cinema namespace. Please follow our Migrating Plugins to the 2025.0 API guide. You are likely just missing a couple of using namespace cinema; at the top of your files.

          Cheers,
          Ferdinand

          MAXON SDK Specialist
          developers.maxon.net

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