Notifications
Clear all

[Closed] C++ SDK Extracting Samples

Is there an easy way to extract a single Project from the Samples.

The large solutions for the Samples and the HowTos are pretty unruly. Attempting to copy the project dir to a new location and opening the project directly in VS is problematic as the mapping of directorys in the project has then changed. For me it causes a crash before I can get in to fix the errors.

Any suggestions would be welcome.

Doc

7 Replies

Any suggestions

leave it as it was installed ?

Two things.

The Samples and HowTos are in 2014 are looking for the SDK in and entirely different locations.

Second the entire solution is a monster when you only need to work on one plugin.

Is there not a standard way to extract a Project from a Solution?

I suggest you to use CMake for building your 3dsmax plug-ins.

With CMake your code will be in one directory, and your vs solutions in a different one, in a structure like this:

/mygloriousplugin/code
/mygloriousplugin/vs2010_32bits
/mygloriousplugin/vs2010_64bits
/mygloriousplugin/vs2012_32bits
/mygloriousplugin/vs2012_64bits

And the solutions will contain different projects for different max releases.

You can use these 4 Mankua projects as samples, they use CMake and build release and debug versions for 32 and 64 bits versions of like 4 o 5 different max releases, all with one simple CMake file:

https://github.com/Mankua/stress
https://github.com/Mankua/powerstamper
https://github.com/Mankua/texlay
https://github.com/Mankua/uvwframe

CMake is awesome to solve this kind of issues!

Oh, and since you want to build the samples, you can create a template CMakeLists.txt file and add it to the files you move from the maxsdk and maxdebug sample directory.

Thank you Pixaeiro. This is an excellent approach.

I gather that there is no avoiding the massive solution that is provided with the SDK. I half expected that there would be a way to export/extract a Project from one Solution to another, but after seeing how your approach works there appears some inevitable manual configuration regardless of how you isolate a particular plugin from the Mother Ship.

Thanks again,
Doc

Yes, you’ll always have to do some manual configuration… like where are your header and library files… and with all the options in 3dsmax (release,debug X 32bits,64bits) it becomes a nightmare to manage all that through tiny visual studio text boxes…

With CMake you define all that in just one place and voila!

you can set the include and library directories for all visual studio projects

options->projects and solutions->VC++ Directories->Include Files and Library Files