THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/10/2012 at 14:27, xxxxxxxx wrote:
Cinema 4D Version:
Language(s) : C++ ;
I have get a very unusual question to you developers.
I never saw any plugin with a header file in res/description with more than an enum in it.
Where do you put your class definition in? Alltimes in the cpp files? What if you use many classes, you put them all in the same cpp file?
Thanks in advance.
On 25/10/2012 at 18:07, xxxxxxxx wrote:
In a regular .h header file, ala:
res/ is only for resource files which are read by Cinema 4D (.h, .res, .str). The header files in the res folder are strictly for enumerating strings, dialog elements, and description elements.
On 25/10/2012 at 21:09, xxxxxxxx wrote:
And after compiling your plugin to cdl it is not necessary to leave your myplugin.h as source? So you can "delete" the .h file? I did not know. Thank you.
On 25/10/2012 at 23:47, xxxxxxxx wrote:
Yes, the actual source code is not required anymore. The only files that need to reside are the .h, .res
and .str files, whereas only the formers are needed for compilation. Although they are saved in your
dll, Cinema 4D needs the .h files to load them at runtime
On 26/10/2012 at 08:24, xxxxxxxx wrote:
You will want to keep these class header files on your system for your project but they are not needed for the end product that you offer to users of the plugin. Headers are standard C/C++ practice for defining classes and other information for your software for inclusion in other headers and source code files. They do no finalize the declaration (of methods) but just offer connection information to other files so that the compiler knows the members and methods of the class (as well as respective enumerations, defines, and so forth).
I typically add them to my projects for direct editing purposes but that is not a requirement. The only files that are explicitly required are the source files as long as headers are "#include"d.