MAXON_MODULE_ID undeclared identifier [R20 C++ plugin]
-
This error appears since I've upgraded to R20 API:
Some of my classes are including apibase.h but it refers to MAXON_MODULE_ID and it seems to be undeclared on my project?
Any idea on this?
Thank you in advance.
-
Hi Victor, thanks for writing here.
With regard to your question, the MAXON_MODULE_ID is a pre-processor define and it's directly connected to the ModuleId that has to be set in the projectdefinition.txt. After doing this (I warmly invite to check the Project Tool page in the Cinema 4D documentation) remember to rebuild the project in order to enforce the changes brought in the projectdefinition.txt.
Last but not least on our Github repo you can find a reference to the projectdefinition.txtBest, Riccardo
-
Thank you I re-generated my project but besides I've added all the .libs to the linker I'm still having some issues on linking all them are related to ModuleInfoWrapper:
error LNK2001: unresolved external symbol "public: static class maxon::ModuleInfo maxon::details::ModuleInfoWrapper<-5597898574948983000>::info"
Any thought on this?
Thank you in advance. -
It looks that project tool didn't generate the .hxx neither the .cxx file.
-
Hello,
just to make that clear: the Project Tool does not create
*.hxx
files.*.hxx
files are created by the Source Processor during the build process. So you have to build or re-build your plugin to create these*.hxx
files.best wishes,
Sebastian -
Hi Riccardo,
please excuse me me for interrupting your work.
I am completely new to the sdk development for Cinamea 4D.
In my company we use currently R 19 to develop plugins in C++
My task is to port our R 19 plugins to R 20.
As far as I could figure out there is a major change in the sdk with the introduction of R 20.The R 20 cinema.framework compiles ok after running the project tool over it.
But now I have the same problem like viktor had: MAXON_MODULE_ID : undeclared identifier.
In a former post you mentioned to put this ID in the projectdefinition.txt file.
Do I have to create this file manually in all plugins folders?
Do I have to run the project tool over these folders once the projectdefinition.txt file is there?As far as I have understood the project tool creates the project files for Visual Studio.
But in our R 19 plugin folders these files are already existing. Would it be enough to put an additional
projectdefinition.txt into these folders?Thank you very much for your time!
Best regards
Andi -
Hi Andi, first of all no need to apologize at all. My work IS to be interrupted and to be as much as possible helpful to our developers!
In order to port/migrate/adapt code pre-R20 to R20, I kindly recommend to read the Plugin Migration section in our documentation where it's properly explained how make this transition happen.
Do I have to create this file manually in all plugins folders?
Yes, projectdefinition.txt should be created for both the project and solutions. The SDK shipped with Cinema has a few projectdefinition.txt files which clearly show where and what to write in.
Do I have to run the project tool over these folders once the projectdefinition.txt file is there?
Yes, the projecttool should be run on the whole folder that contains the sdk where both frameworks and plugins are located.
The projecttool is indeed responsible to create both VisualStudio and Xcode project/solution files, so running once you get your IDE-required files properly created.But in our R 19 plugin folders these files are already existing. Would it be enough to put an additional projectdefinition.txt into these folders?
My suggestion is to use a completely different folder for your R20 plugins and to structure it as follow:
<plugins folder> |-<project a> |-<project b> |-<project x> | |-project | | |- projectdefinition.txt | |-source | |-source_1.cpp | |-source_2.cpp | |-... | |-source_n.cpp
Then run the projecttool and you should be provided with all the needed files for VisualStudio.
Let me know if something is still unclear or missing.
Best, Riccardo
-
Hi Riccardo!
Thank you very very much for your detailed explanation.
That helped me a lot and YEAHHHH....got it workingThanx in advance for your time!
Best regards
Andi