Help!! C++ SDK, VS 2017 Community [SOLVED]
-
On 18/05/2017 at 03:19, xxxxxxxx wrote:
-
On 18/05/2017 at 03:26, xxxxxxxx wrote:
VS 2017 is not supported.
[URL-REMOVED]And about VS 2015 https://developers.maxon.net/forum/topic/9606/12903_vs-2015-update-3-compiler-changes
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
On 18/05/2017 at 03:29, xxxxxxxx wrote:
Thank you for the quick reply
-
On 18/05/2017 at 05:36, xxxxxxxx wrote:
-
-
On 18/05/2017 at 07:08, xxxxxxxx wrote:
If you look at this page: [URL-REMOVED]
You'll see that VS 2013, not VS 2012, is required for R18. If you have VS 2012, you can develop for R16 and you may well find that your plugin will also run in R17 and R18, but it may not.
If necessary you can still get the VS 2013 community edition which is free and will do all you need for plugin development.
Steve
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
On 18/05/2017 at 07:36, xxxxxxxx wrote:
-
On 19/05/2017 at 02:37, xxxxxxxx wrote:
-
-
On 19/05/2017 at 02:47, xxxxxxxx wrote:
No there is two main repository one for python and one for C++.
I really suggest you to take a look at those videos
(you can followin it with VS 2013 and R18) There is no real change.
And the part two
You also get this one:
But what I do on each new release.
I copy the sdk exemple in my HDD.
I copy the sdk_exemple into another folder within the plugin forlder of c4d.
I open the solution according the right VS version. I remove every files who are into the sdkExemple(don't touch to cinema.framework)
And that's it you can start. -
On 19/05/2017 at 02:51, xxxxxxxx wrote:
Thanks for your support
-
On 19/05/2017 at 03:07, xxxxxxxx wrote:
Hi Lawrence,
welcome to the Plugin Café forums
On your question in your first post:
Unable to start program
\ Program Files \ MAXON \ CINEMA 4D R18 \ plugins \ cinema4dsdk \ ProjectName.cdl64In the end a plugin is a library (dll), this can't be started directly. Instead you need to tell VisualStudio to call the Cinema 4D application, when you want to debug your plugin. See this page on Debugging Plugins, the screenshot in chapter 1.1.1 shows how to set this up.
And then I'd say, before setting up your own project you probably want to try to compile the example plugins (the cinema4dsdk.sln). If you run into any problems with this, don't hesitate to get back here. In this case try to provide as much details as possible, especially any messages in VisualStudio's console or output window can be helpful.
-
On 19/05/2017 at 03:11, xxxxxxxx wrote:
-
-
On 19/05/2017 at 04:07, xxxxxxxx wrote:
-
On 22/05/2017 at 08:39, xxxxxxxx wrote:
Hi Lorenzo, let's try to find a solution to this lengthy discussion, but first of all a few notes about posting in this forum:
- please avoid using bold characters or uppercase sentences which might be felt as shouting (ref at https://it.wikipedia.org/wiki/Netiquette (le regole importanti, point.3)
- try to be as much as possible clear and concise to avoid multiple posts in the same thread just one after the other (in case you can edit your post and add additional information)
With reference to the issue reported, please consider the following compatibility table:
Cinema 16 - Visual Studio 2012
Cinema 17 /18 - Visual Studio 2013First of all let's check that the development environment is properly configured.
- Remove any VisualStudio already installed and just keep only the VisualStudio based on the Cinema version you would like to develop on.
- Assuming you're developing for R18 open VS2013, and in order to be sure that everything works properly, try to load the cinema4dsdk.sln solution found in <drive to cinema installation>:<path to cinema R18 installation>\plugins\cinema4dsdk.
- If no error pops up during the loading process then set the Configuration to " Debug " and build the solution clicking " F7 "
- After the building process has properly ended, right click on the cinema4dsdk project and select "Properties".
- Under " Configuration Properties "->" Debugging " populate the " Command " field with the value "..\..\Cinema 4D.exe"
- Now clicking F5 Cinema should start and the cinema4dsdk examples should be running in debug mode.
If all the steps below have been successfully accomplished, you can be sure that your development environment is working properly.
- It's now the turn to duplicate the whole cinema4dsdk folder in a new folder named, for example, "MyFirstPlugin".
- After getting the folder duplicated enter the newly created folder and rename both cinema4dsdk.sln and cinema4dsdk.vcxproj respectively in "MyFirstPluginSolution.sln" and "MyFirstPluginProject.vcxproj"
- Now open the MyFirstPluginSolution in VS2013 and as soon as it gets opened you will see that in the Solution Explorer the cinema4dsdk project will have a bluish exclamation mark hinting to the fact that the project has not been found.
- Right click on the project and select " Remove " to remove the project from the MyFirstPluginSolution
- Right click on the solution and select " Add- >Existing Project…" then browse up to the folder containing the MyFirstPluginProject.vcxproj and add it.
- Build the solution to be sure that everything works properly and at the end of the building process you should found the "MyFirstPluginProject.cdl64" file in the solution folder. In the folder you should also find some other files starting with "cinema4dsdk" which can be now removed to make the room tidy and clean.
Now you can get rid of all the files contained in your MyFirstPluginProject, by selecting them from the Solution Explorer in VS2013 and deleting them. Simply select them all, right click and select " Remove ". At this stage you can add your own files and start having fun developing with Cinema 4D.
Hoping this short set of steps could lead you to get rid of all your issue, I warmly invite posting into this thread any further issue.
Best, Riccardo.
-
On 22/05/2017 at 10:28, xxxxxxxx wrote:
Thank you so much! Riccardo, I am solving ... If I'll have any problems, I'll let you know through the forum.
-
On 22/05/2017 at 15:18, xxxxxxxx wrote:
I have problems with the code ..
I've already created the dialog with ResEdit and, I have correctly configured the description files and the c4d_symbols.h file. But I get these bugs on the code ...
IDE | VISUAL STUDIO VS2013 For Plug-in Cinema 4D R18
MyPlugin.cpp
#include "c4d.h" #include "c4d_symbols.h" #include "MyPlugin.h" #define PLUGIN_TEMPLATE_ID 1039315 /***********************************************/ /* Plugin Template */ /***********************************************/ PluginTemplate::PluginTemplate() { } PluginTemplate::~PluginTemplate(void) { } Bool PluginTemplate::CreateLayout(void) { if (!GeDialog::CreateLayout())return FALSE; if (!LoadDialogResource(PLUGIN_TEMPLATE_ID, NULL, 0))return FALSE; return TRUE; } Bool PluginTemplate::InitValues(void) { if (!GeDialog::InitValues())return FALSE; this->SetReal(IDC_EDIT1, 200.0, 1, 1000, 10); this->SetReal(IDC_EDIT2, 200.0, 1, 1000, 10); this->SetReal(IDC_EDIT3, 200.0, 1, 1000, 10); return TRUE; } Bool PluginTemplate::Command(Int32 id, const BaseContainer &msg) { Real edit1 this->GetReal(IDC_EDIT1, edit1); Real edit2 this->GetReal(IDC_EDIT2, edit2); Real edit3 this->GetReal(IDC_EDIT3, edit3); return TRUE; } /***********************************************/ /* Template */ /***********************************************/ class PluginTemplateCommand : public CommandData { public: /* Constructor & Descriptor */ PluginTemplateCommand(); virtual ~PluginTemplateCommand(); virtual Bool Execute(BaseDocument *doc); virtual Bool RestoreLayout(void *secret); private: PluginTemplate *dlg; }; PluginTemplateCommand::PluginTemplateCommand() { dlg = NULL; } PluginTemplateCommand::~PluginTemplateCommand() { gDelete(dlg); } Bool PluginTemplateCommand::Execute(BaseDocument* doc) { if (!dlg) dlg = gNew PluginTemplate; if (!dlg) return FALSE; dlg->Open(DLG_TYPE_ASYNC, PLUGIN_TEMPLATE_ID); return TRUE; } Bool PluginTemplateCommand::RestoreLayout(void* secret) { if (!dlg) dlg = gNew PluginTemplate; if (!dlg) return FALSE; dlg->RestoreLayout(PLUGIN_TEMPLATE_ID, 0, secret); return TRUE; } /***********************************************/ /* Register Plugin */ /***********************************************/ Bool RegisterPluginTemplate() { return RegisterCommandPlugin(PLUGIN_TEMPLATE_ID, "Plugin Template", 0, AutoBitmap("Icon.png"), String(), gNew PluginTemplateCommand); }
-
On 22/05/2017 at 15:21, xxxxxxxx wrote:
I have problems with, gDelete, gNew, SetReal
Console Log Response ________1 IntelliSense: class "PluginTemplate" has no member "SetReal" c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 32 8 PluginTemplate 2 IntelliSense: class "PluginTemplate" has no member "SetReal" c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 33 8 PluginTemplate 3 IntelliSense: class "PluginTemplate" has no member "SetReal" c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 34 8 PluginTemplate 4 IntelliSense: identifier "Real" is undefined c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 42 2 PluginTemplate 5 IntelliSense: expected a ';' c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 42 13 PluginTemplate 6 IntelliSense: identifier "Real" is undefined c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 43 2 PluginTemplate 7 IntelliSense: expected a ';' c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 43 13 PluginTemplate 8 IntelliSense: identifier "Real" is undefined c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 44 2 PluginTemplate 9 IntelliSense: expected a ';' c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 44 13 PluginTemplate 10 IntelliSense: identifier "gDelete" is undefined c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 75 2 PluginTemplate 11 IntelliSense: identifier "gNew" is undefined c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 81 18 PluginTemplate 12 IntelliSense: expected a ';' c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 81 23 PluginTemplate 13 IntelliSense: identifier "gNew" is undefined c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 93 18 PluginTemplate 14 IntelliSense: expected a ';' c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 93 23 PluginTemplate 15 IntelliSense: identifier "gNew" is undefined c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 108 107 PluginTemplate 16 IntelliSense: expected a ')' c:\Program Files\MAXON\CINEMA 4D R18\plugins\PluginTemplate\source\MyPlugin\MyPlugin.cpp 108 112 PluginTemplate
-
On 22/05/2017 at 15:23, xxxxxxxx wrote:
MyPlugin.h
#include "c4d_gui.h" ////////////////////////////////////////// class PluginTemplate : public GeDialog { public: PluginTemplate(); virtual ~PluginTemplate(); virtual Bool CreateLayout(void); virtual Bool InitValues(void); virtual Bool Command(Int32 id, const BaseContainer &msg); };
-
On 22/05/2017 at 15:24, xxxxxxxx wrote:
main.cpp
#include "c4d.h" #include <string.h> Bool RegisterPluginTemplate(); Bool PluginStart(void) { if (!RegisterPluginTemplate()) return FALSE; return true; } void PluginEnd(void) { } Bool PluginMessage(Int32 id, void* data) { if (!resource.Init()) return FALSE; if (!RegisterPluginTemplate()) return FALSE; return false; }
-
On 22/05/2017 at 15:38, xxxxxxxx wrote:
I started from the structure of your samples..
Here the Screen ..https://www.dropbox.com/s/qwbnsq8695ezezz/2017-05-23.png?dl=0
Thanks in advance for any help you are able to provide.
-
On 22/05/2017 at 17:22, xxxxxxxx wrote:
c4d_symbols.h
enum { // Dialog definitions of IDD_PLUGIN_TEMPLATE start here IDD_PLUGIN_TEMPLATE, IDC_EDIT1, IDC_EDIT2, IDC_EDIT3, // Dialog definitions of IDD_PLUGIN_TEMPLATE end here // End of symbol definition _DUMMY_ELEMENT_ };