Project compile error [SOLVED]

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

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.

Best wishes,
Sebastian

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