[Closed] [SDK] Plugin compiling for each 3ds max version
Hello.
I’m not a visual studio specialist , in fact I always have some problems with stuff like linking, adding libraries etc.
I’m using 3ds max 2014 64-bit SDK, and I can succesfully compile plugins for this version, but I want to have versions let’s say compatibile with 2009-2015, both 32 and 64 bit. Do I need to install 6 SDKs? What is the best workflow to compile a plugin?
Some versions of 3ds Max don’t break backwards compatibility with previous SDK versions. You need to install the version of visual studio as given in the SDK Requirements table.
Max 2009 SDK requires VS 2005 SP1
Max 2010 SDK requires VS 2008 SP1 (plugins will work in Max 2011)
Max 2012 SDK requires VS 2008 SP1
Max 2013 SDK requires VS 2010 SP1 (plugins will work in Max 2014)
Max 2015 SDK requires VS 2012 Update 4
I would suggest taking your code into earliest SDK and compile and then import the project into later versions. Unicode wasn’t completely supported prior to Max 2013 (see relevant SDK help docs). Bringing an ASCII project forward into Max 2013… I had to create a clean plugin project with the 2013 SDK wizard and copy my code into that skeletal framework (…and make necessary unicode changes) so as to overcome some linking errors. Max 2013 is last version to support 32-bit plugins.
Ok, good to know that, but for now I’m compiling my project using 3ds max 2014 plugin wizard, which automatically sets all paths, libs, dependencies etc. How to setup my visual studio now to compile such project using max different sdk? Which options in the project properties should I change?
(make sure you have a full backup of your whole project before you start messing with this)
It’s a lot of work, but typically what you do is to create and set it up this way:
On top of your screen in VS there is ‘release’ and ‘debug’ in the dropdown,
click there and select ‘Configuration manager’.
In the manager you create a new configuration (let’s say you name it max2010).
Then go back to your VS gui, select the new configuration from the drop down.
Then you right-click your project in the solution explorer, and add new paths there to the other SDK, add paths to the libs, includes and so on to max 2010 SDK.)
This way you can have different configurations for different SDK versions etc.
But keep in mind that the SDK’s have different (and often older) visualstudio versions as recommended versions…
This can be solved by having older versions of visual studio installed, and then set it to use that older compiler from the newer visual studio version you are working in.
All of this is a bit demanding and troublesome to set up, but that’s basically what you need to do.
On my own projects I only support the latest version of max, with the latest SDK, I do never care about older versions, but I can see why it’s needed at times.
Good luck!
Thanks a lot. I think I’ve finally managed to compile it correctly I’ve read that there was some Unicode change since max 2013, I’m wondering if I will be able to correctly build the plugin for max 2012 and older (oryginally writen with max sdk 2014, so far I compiled it to 2013, 2014 and 2015).
The unicode stuff is mostly relevant when dealing with strings and such.
you can fix that by using some defines, for example this function, that let’s you get string and make it return it ‘properly’ based on what version of max you are compiling for.
You can do tricks that this to handle the unicode stuff.
#if MAX_VERSION_MAJOR < 15
const std::string & getstring(const char* str)
{
return str;
}
#else
std::string getstring(const wchar_t* wstr)
{
std::wstring ws(wstr);
std::string str(ws.begin(), ws.end());
return str;
}
#endif
It might sound strange but now I need to compile one of my plugins written for max 2016+ for max 2012. And I met difficulties doing that. So I have several questions…
1
as i see max 2012 requires vs 2008 (only!), but i’m looking in max sdk samples and see *.vcxproj files instead of *.vcproj files which the VS 2008 works with.
the question – How does it work? How can I to convert(?) project files to play with?
2
does anyone still work with max 2012 SDK? could you please send me any working vcproj file configured for x64? (i’m doing exactly the same setup for max 2014, 2016, 2017 and it works fine, but it doesn’t work for max 2012)
thanks,
We compile 2014-2017 with VS15 with no problems. *I don’t think we have any 2012 projects, I can check tomorrow when I get in office.
Same as I’m. The max 2012 is *a ‘transition’ from 32 bits to 64. That why we skipped this version for development. I have everything working for versions before 2012 and after. the 2012 is only the problem. I know that some people successfully compiled max 2012(64) plugins using VS2010. But I don’t have time now for research.
I have also compiled an exporter (Quake3 MD3) project for Max 6 thru Max 2014 with Visual Studio 2010. Can you copy your Max2011 x86/x64 project folder into your 2012 projects and recompile it using the 2012 SDK and VS2010 (…updating your project properties to point to and rename things to 2012 of course)? That should work…
…then the Max2012 plug-in users will need to install the VS2010 runtimes for their machines.
Thank you, guys! after some fighting i have could be able to compile max 2012(64) plugin with VS10. And it works!