On 30/11/2017 at 22:53, xxxxxxxx wrote:
Cinema 4D Version: 18/19
Platform: Windows ;
Language(s) : C++ ;
Alright, I've finally decided to give C++ a shot for some development. Hoping to potentially get some speed boosts and use some functions that are missing in the Python SDK.
Ok, so I am on Windows 10. I have Visual Studio 2017 Community edition(since it's free). I was trying to follow along with Frank's tutorial here and so I made a new plugin folder, I created an empty res and source folder. I located the cinema4dsdk folder and copied the .props and .vcxproj files into my plugin's folder.
I then renamed the project file and tried to open it in VS 2017. In doing so, I get the following error:
Unable to read the project file <my file name>. <The path to my project file>.vcxproj(57,5) : The imported project <user prefs path>\frameworks\settings\IntelWin64.props was not found. Confirm that the path in the <Import> declaration is correct and that the file exists on disk.
What is causing this error, and how can I get rid of it and get back to failing at C++
On 30/11/2017 at 23:16, xxxxxxxx wrote:
Firstly make sure to use the correct Visual Studio version, even more if you are not confident with C++ it will help you to start, then you will be able depending of the SDK to do some relinking and stuff like that in order to have a working version for VS 2017.
To know which VS version to use, take a look at https://developers.maxon.net/?page_id=1108
Then I suggest you to check the C++ SDK and more especially Project Setup I would recommand you to firstly do the "Setup Project by Cloning cinema4dsdk" wich is the simpler version and the quicker to get to work. But doing it from scratch will allow you to understand all the parts of the SDK, and how linking/dependance work inside c4d (it will help you to figure out and make it run into VS 2017)
Moreover I really suggest you to read some manuals especially Debugging / Plugin Code Style Guide which can really help you to get started with C++
On 02/12/2017 at 09:31, xxxxxxxx wrote:
I got close but I still was running into problems with the cinema.framework again.
Im not used to so many hiccups to get started. With python it's just up and go.
This is going to take me some serious time.
On 04/12/2017 at 08:36, xxxxxxxx wrote:
first of all, before setting up any custom project of yours, is the cinema4dsdk example project (in its delivery state) compiling without any issues?
And you said, you are getting close, but run into problems with cinema.framework? What errors exactly?
And no need to feel desperate already. You are not alone, we'll try our best to get you going.
On 04/12/2017 at 21:30, xxxxxxxx wrote:
So I have like 3 Visual Studios on this machine, 2013, 2015, & 2017.
Every time I would try to build, it would complain about like some build tools version 141 being required or something. That was popping up in 2013 and 2015. It looks like from, what I gathered online, that it's because 2017 was on the machine, and it had pushed it to be 141 instead of 140. So I ended up following Kent Barbers video about it, and it did build in 2017 properly. So that part worked.
I ended up going through the manual process just step by step from one of the links above, just to try something new. So in here: https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_project_from_scratch_visual.html I am on Step 7. Everything up to this point was no trouble. However, I go to the Solution Manager, I right click on my plugin at the top and choose Add>Existing Project. Then I navigate to the framework project file it mentions, but I get the following error when trying it:
"Unable to read the project file 'cinema.framwork.vcxproj'. <Path to C4D R19>\frameworks\cinema.framwork\project\cinema.framework.vcxproj(122,5) : The imported project <R19 path>\plugins\frameworks\settings\ReleaseWin65.props' was not found. Confirm that the path in the <import> declaration is correct and that the file exists on disk"
Now, I've got my plugin/project in the appdata plugins folder, not the program files one. Does that cause me problems? Should I be working in one or the other?
As I said, everything up to this point has worked in that tutorial but now this step has me haulted for now.
On 05/12/2017 at 08:59, xxxxxxxx wrote:
to be honest I'm a bit confused by the number of Visual Studio versions involved.
For Visual Studio 2017 we currently can't provide support, yet. Sorry, I hope you understand, we can only support the versions listed here.
Then, if I understand correctly, you have a working project setup in VS 2017, right?
I'd still be interested, if the original cinema4dsdk example project (either R18 or R19) compiles without any changes or re-location in the specified Visual Studio version? You may have to add write permissions to the cinema4dsdk folder, though.
Actually the toolset version (140, 141 in your post) should be correctly set in the delivered project files. And as long as you don't load these solutions/projects into a newer Visual Studio version, I see little reason these should change or several Visual Studio versions should interfere.
In which Visual Studio version did you try the manual project setup? With this information I will then try to reproduce the issue.
Working in a changed location can indeed be a bit fiddly to setup. But that's what the manual project setup tutorial is there for and I'd like to find the reason it's not working for you.
On 05/12/2017 at 11:26, xxxxxxxx wrote:
When starting out this is what I would do.
1. Copy your "Cinema 4D" folder to somewhere else on your computer. IE "C:\Coding\Cinema 4D". You are copying the entire folder.
The reason to do this is so that you can make changes to the plugins folder without any "this folder is protected because its in c:\program files" messages. It also ensures you don't mess up your main version of C4D, which might have a tonne of other plugins installed and other things setup.
2. Go into the plugins folder and copy the cinema4dsdk, then paste it again at the same location, then rename it. IE "mycoolplugin".
3. Go into your new mycoolplugin folder and open up cinema4dsdk.vcxproj in the appropriate version of Visual Studio
You should not open it up in a newer version than you intend to use, otherwise it will change the project. So don't open it in 2017, then try 2015 then try 2013. This won't work. Make sure you only open it in the version you intend to use. So for R18 use 2013. If you have already opened it up before you copied the Cinema4dSDK, then I suggest installing C4D again from scratch into your new location, so that you have an un-altered version of the cinema4dsdk plugin.
4. Don't move your plugin. Just leave it in the plugins folder. Otherwise you will get the framework bugs you mentioned.
5. If you have previously compiled the cinema4dsdk plugin, then make sure to go into that folder and delete the cinema4dsdk.dll that it made since it will clash with your copy.
6. Instead of step (5) you should actually rename your plugin. You can do that by right clicking (or double click) in visual studio on the name "cinema4dsdk" and choose rename. The project settings will pick this up and your output file will then be whatevername.dll. Just make sure you don't ever have 2 dlls in your myplugin folder.
So just to wrap up. Don't do anything extra. Just install c4d somewhere that doesn't have file protection issues (or copy paste). Then copy the cinema4dsdk and rename its folder name. Leave it in the plugins folder, don't move it around. Then remove stuff from the cinema4dsdk example that you don't need.
I do think that MAXON should ship a basic empty plugin as well as the cinema4dsdk. It would make things a whole lot easier for beginners.
I will try to cover all of this in a video in a few weeks if I have some time.