[c++, R21] Trouble compiling + include C4D libraries in Houdini
-
Hello!
So just some background:
I wanted to try and port some of the noise functions over to the Houdini VOP's context. Redshift already came with a bunch of the C4D noises, but they are only available inside the shader network.So I downloaded r23, following the instructions online. Exported the SDK to a path ("C:\Custom\Maxon\SDK"), and then placed the tool nearby as well ("C:\Custom\Maxon\Tool"). Ran the tool following the instructions, and it built the libraries. Great, but when I went to load it up in vs2017, it threw an error that it wanted vs142 tools. Now, Houdini is currently built with vs141 only, so I thought I'd have to then downgrade the SDK + tool used. OK, so not much of an issue there, I grabbed one of the older tools (r21), and built that SDK as well.
So I then loaded up one of the plugins that came with it, the "microsdk" for example), and clicked on "Build". This threw the error it couldn't find system1.hxx.Now this is an error I came across a lot trying to do r23, until I figured out why it was so. But the r21 sdk doesn't generate those files at all, so I've no idea what I'm doing wrong.
Finally, looking over the r18 documentation, even though its "harder" (IE, more steps), it actually made sense to do it their way, adding .proj files, setting the system variables and such.
So this means when I try and make a Houdini SOP (I'm trying to make a VEX one for starters), and use the include of lib_noise, then it will go down the chain of c4d_library.h to operatingsystems.h, to not finding the system1.hxx. And when I do somehow manage to get past this, but forcing includes to where the .hxx files are, I get a ton of compile errors stating that "err" is not defined, and MAXON_MODULE_ID is undeclared.
Any help on this front would be amazing, as I have no idea what I'm doing wrong!
-
@JaronW you can’t use the R21 build tool too make R23 plugins.
If you want to build using v141 then you could try using Cinema 4D R21. If you have a subscription then you can download and use any version from R21 onwards.
Building manually will be tricky, and probably impossible, since the project tool generates files required to build, which is why you are getting all your errors.
C4D changed dramatically since R20, especially in terms of how to compile.
Your best bet is to use R21with the R21 project tool and Visual Studio 2017. If it works and you get something going then you can start looking it or R23.
Not something that the SDK team can really help with I don’t think.
Best of luck with your project!
Cheers,
Kent -
Hi @JaronW, thanks for reaching out us.
With regard to your initial idea, I inform that it's not possible to port Cinema 4D native noise function to Houdini either from the API and, mostly important, the legal point of view.
With regard to the issue you ran into, be aware that SDK belonging to a specific Cinema 4D version (let's say R21) require specific ProjectTool and you can't make the ProjectTool expecting R21 SDK to work flawlessly with R23 SDK.
Last but not least the C4DNoise class has been designed to be used only in Cinema 4D plugins.Best, Riccardo
-
Hi @r_gigante, thanks for the response! (And thank you @kbar as well!).
I'm glad you did mention that it wasn't even possible legally, as it was an area I was concerned over.
Also concerning your last point, would there be any hope to have the C4DNoise come as an addon in the Redshift library then for the VOPs context?However, concerning the last point. I'll outline my steps I did.
So I download the trial of r23, and installed it. I then grabbed the sdk.zip file, and unzipped it into "C:\Custom\Maxon\SDK" (so both frameworks and plugins exist in that folder). Then I grabbed the latest ProjectTools available, and in the commandline ran "kernel_app_64bit g_updateproject=C:\Custom\Maxon\SDK", and it generated the files needed.
I then open up the cinema4dsdk project file in "C:\Custom\Maxon\SDK\plugins\cinema4dsdk\cinema4dsdk.vcxproj" in Visual Studio 2019, and then right clicked on the solution and pressed "build". Here is the output I got.
Build started... 1>------ Build started: Project: cinema4dsdk, Configuration: Debug x64 ------ 1>Source processor 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\filter\stl.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\hair_deformer.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\objectdata_revolvedmesh.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\painting\advanced\paintbrushsculpt.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\sculpting\loadsave.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\customdata_customgui.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\circle.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\objectdata_planebypolygons.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\arraytutorial.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\python.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\painting\advanced\paintbrushbase.h... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\painting\advanced\paintundo.h... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\sculpting\sculptbrushtwist.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\shader\mandelbrotshader.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tool\reversenormals.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\memstat.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\hair_constraint.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\objectdata_greektemple.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\shader\simplematerial.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\layershaderbrowser.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\hair_generator.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\objectdata_porcupinemodifier.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\takeTest.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\sculpting\pullbrush.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\sculpting\splinebrush.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\videopost\hair_videopost.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\layershaderbrowser.h... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\main.h... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\gravitation.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\objectdata_hyperfile.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\misc_delegate_test.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\painting\advanced\paintchannels.h... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tool\liquidtool.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\listview.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\hair_collision.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\objectdata_loftedmesh.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\painting\advanced\paintundo.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\shader\particlevolume.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\serial.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\dropeffector.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\objectdata_heartshape.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\objectdata_shufflingparticles.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\movecopyconstructors.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\painting\advanced\paintchannels.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\sculpting\sculptdeformer.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tag\customdatatags.h... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\videopost\vpinvertimage.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\objectdata_descriptions.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\sculpting\sculptmodifier.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\shader\gradientshader.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\videopost\vpreconstructimage.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\menutest.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\atom.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\triangulate.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\command_test.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\painting\advanced\paintbrushids.h... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\painting\advanced\rasterize_bary.h... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tag\lookatcamera.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\videopost\vpvisualizenormals.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\bitmapfilter\paint_saver_test.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\customgui_string.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\objectdata_getsetdparameter.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\command_test.h... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\snapdata_nullsnap.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\painting\advanced\registeradvancedpaint.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\sculpting\drawpolybrush.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\shader\bitmapdistortionshader.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tool\pickobject.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\gedialog_gadgets.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\polygonreduction.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\painting\advanced\paintbrushbase.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\sculpting\cubesbrush.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\sculpting\selectionbrush.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tag\hair_render.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\videopost\vpcolorize.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\gradientuserarea.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\hair_grass.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\roundedtube.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\pgp\pgp.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tag\hair_styling.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tool\snaptool.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\animation\blinker.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\asynctest.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\noiseeffector.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\objectdata_ruledmesh.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\sculpting\drawpoly.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\shader\illumination.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tool\sculpting.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\datatype\datatype.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\gradientuserarea.h... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\subdialog.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\hair_force.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\objectdata_latticeplanemodifier.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\falloff\randomfalloff.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\gui\activeobject.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\objectdata_vertexhandle.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\misctest.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\painting\advanced\registeradvancedpaint.h... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\sculpting\grabbrush.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\shader\hair_shader.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tool\edgecuttool.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\main.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\morphmixer.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\object\spherify.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\commandlinerender.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\sculpting\sculptbrushmultistamp.cpp... 1> Parsing C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tag\customdatatags.cpp... 1>Loading generator module cppgenerator from ..\..\..\frameworks\settings\sourceprocessor\generators\cppgenerator.py... 1>Loading generator module dumpgenerator from ..\..\..\frameworks\settings\sourceprocessor\generators\dumpgenerator.py... 1>Loading generator module phgenerator from ..\..\..\frameworks\settings\sourceprocessor\generators\phgenerator.py... 1>Loading generator module summarygenerator from ..\..\..\frameworks\settings\sourceprocessor\generators\summarygenerator.py... 1>Looking for source files in C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk... 1>********** 1>Source processor: 1>C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\command_test.cpp(77,24): warning : Interface CommandClassInterface not found in frameworks. 1>C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\other\command_test.cpp(77,24): warning : Interface CommandInteractionClassInterface not found in frameworks. 1>C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tag\customdatatags.cpp(15,30): warning : Interface CustomDataTagDisplayInterface not found in frameworks. 1>C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tag\customdatatags.cpp(104,23): warning : Interface CustomDataTagClassInterface not found in frameworks. 1>C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tag\customdatatags.cpp(305,30): warning : Interface CustomDataTagDisplayInterface not found in frameworks. 1>C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tag\customdatatags.cpp(426,23): warning : Interface CustomDataTagClassInterface not found in frameworks. 1>C:\CustomTools\Maxon\SDK\plugins\cinema4dsdk\source\tag\customdatatags.cpp(625,22): warning : Interface CustomDataTagClassInterface not found in frameworks. 1>********** 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(408,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|Win32. 1>Done building project "crypt.framework.vcxproj" -- FAILED. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(408,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|Win32. 1>Done building project "cinema.framework.vcxproj" -- FAILED. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(408,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|Win32. 1>Done building project "math.framework.vcxproj" -- FAILED. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(408,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|Win32. 1>Done building project "mesh_misc.framework.vcxproj" -- FAILED. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(408,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|Win32. 1>Done building project "geom.framework.vcxproj" -- FAILED. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(408,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|Win32. 1>Done building project "python.framework.vcxproj" -- FAILED. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(408,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|Win32. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(408,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|Win32. 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(408,5): error MSB8013: This project doesn't contain the Configuration and Platform combination of Debug|Win32. 1>Done building project "command.framework.vcxproj" -- FAILED. 1>Done building project "cinema4dsdk.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
So thats something. If I mess around with it a bit, I also get some weird "err does not exist" errors (but if I can get past this error first, that'd be great!)
-
Hi @JaronW you don't have to open the project file, but rather the solution file you find in
C:\Custom\Maxon\SDK\plugins\projects\plugins.sln
Cheers, R