[Closed] [SDK] Porting to Max 2014 and Older
I realize that almost everyone who can answer this has likely been doing C++/SDK for many years and might roll their eyes at my lack of C++ experience (delving into it only after years of MAXScript). But we all got to start somewhere… and I always learn best jumping in head first.
I’ve nearly finished porting a MAXScript plugin into C++. I used samples in Max 2016 SDK to get me to where I’m at (and the plugin is working as expected) when compiling for 2015-2017. But when I set up a project for 2014, the compiler fails because of: cannot instantiate abstract class.
So there must be some magic that was implemented in Max 2015+ that wasn’t there in older versions. From my limited knowledge and from what I’m blindly gathering from reading the SDK docs, my assumption is that it relates to the Reference System changes noted in Max 2015. But that may be incorrect… it’s my hunch.
The question is what direction to look when back-porting plugins developed in Max 2016 that need to go back to 2012-2014?
The basic procedure is this:
Create a full backup of your project before you start this!
Create a new configuration for Visual studio (up at the top menu where it says release\debug),
you create a new configuration there, copy one of the existing ones (Release for example),
then name it ‘Release 2014 x64’, then what you do is to point your project to the 2014 SDK
while ‘release 2014’ is selected, this is done by right-clicking your project, then change the ‘include,lib’ directories and all that which is pointing to the current SDK.
I’ll admit it was confusing to me too at first, but once you get the hang of this you know how to do it
next time as well.
VS should then switch your project over to that SDK version when you select it in your list.
Code that are not compatible can be fixed by ‘defines’, I did not when I had to write code
between 2012\2014,
Wrap up the code like this where it’s needed:
#if MAX_VERSION_MAJOR < 15
//code compatible with 2012
#else
//code compatible with 2014
#endif