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

    Project compile error [SOLVED]

    SDK Help
    0
    3
    308
    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 04/02/2015 at 07:34, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R16 
      Platform:      Mac OSX  ; 
      Language(s) :     C++  ;

      ---------
      Hi,

      I've followed some tutorials (from MAXON and others) and finally could build my cpp plugin.
      The problem is, it raises 2 errors.
      1. Use of undeclared identifier 'gNew'
      2. Unknown type name 'LONG'

      This is my code I copied from a tutorial:

      #define ID_HELLOTEST 1000001        // Unique ID for this plugin

      #include "c4d.h"

      //########################################

      class HelloWorldTest : public CommandData       // Data class for creating new commands (previously known as "menu plugins").
      {
      public:
        virtual Bool Execute(BaseDocument *doc)
        {
            MessageDialog("Hello World");           // Simple popup message.
            GePrint("This is my first cpp plugin"); // Output to C4D's console window.
            return TRUE;
        }
      };

      //########################################

      Bool PluginStart(void)              // The main function C4D calls to begin your plugin (think of it as main).
      {
        return RegisterCommandPlugin(ID_HELLOTEST, "Hello Wolrd", 0, NULL, String("Hello World"), gNew HelloWorldTest);
        // Registers a command plugin with C4D
      }

      void PluginEnd(void)                // Called when the plugin is unloaded from C4D.
      {
      }

      Bool PluginMessage(LONG id, void *data)         // Allows you to receive plugin messages from C4D or other plugins.
      {
        return TRUE;
      }

      Does anybody know what the problem is here?

      Thanks for your help and time!
      Greetings,

      Casimir Smets

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

        On 04/02/2015 at 08:07, xxxxxxxx wrote:

        Hello,

        gNew and LONG are depreciated symbol names, please use the current symbol names. See the list of name changes in R15[URL-REMOVED].

        Best wishes,
        Sebastian


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

          On 04/02/2015 at 08:15, xxxxxxxx wrote:

          Hi,

          Thanks for your answer, that did it!
          Surely you can close this post now.

          Greetings,
          Casimir Smets

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