[Closed] Configuring Visual Studio for the SDK?
I want to start learning the SDK so I can get my plugins to run faster. I’m trying to follow the lessons in the 3ds Max SDK Programmer’s Guide, but even when I try compiling the lesson projects I get the following in my output window:
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\x64\Microsoft.Cpp.x64.Targets(146,5): error MSB6006: “CL.exe” exited with code -1073741515.
1>
1>Build FAILED.
When I follow the error, it brings me to the “Rest of the sources” section of the Microsoft.Cpp.x64.Targets file, where I am noticing that several of the attributes are not declared (specifically, BuildingInIDE, ToolArchitecture, TrackerFrameworkPath, TrackerSdkPath, and YieldDuringToolExecution).
I’m working with Max 2012 and Visual Studio 2010. I already noticed that under the heading of Configuring the Development Environment, it has the following directions:
When building a new 3ds Max plug-in, Visual Studio needs to know where to find header files and library files. You can do this for each individual project, but it should be easier to update the Visual Studio global settings. This can be done by going to the Visual C++ options dialog (accessed from the menu Tools > Options …), and selecting in the node “Projects and Solution > VC++ Directories”.
Which is apparently no longer a thing as of VS2010. I learned that you add the include and library directories from the Property Pages instead. So I went ahead and added the \include and \lib sub-folders of my maxsdk directory respectively to the Include Directories and Libary Directories under VC++ Configuration Properties.
It seemed to work, as many of the errors that were showing up in the Plug-in Wizard skeleton code disappeared. But when I try to compile, I am getting the error I mentioned above.
The problem with propertysheets is, that they don’t overwrite the project settings themself ( which are contained in the *.vcxproj file ). So it’s always best to start off with a fresh project and add the max propertyheets. Or go through the project properties one by one and reset wrong settings in the project properties to inherit from the propertysheets . Despite the use of propertysheets it’s usually a mess. Most of the time when working with old projects or projects from other people i have to edit the vcxproj file by hand ( it’s an XML file finally )
The rudimentary form of the property manager in Visualstudio, where you assign the property sheets does’nt help for the task either.
Back to your problem: what’s your property manager’s property sheet assignment looking like ? Your problem looks like a general problem with your propertysheet setup, not really 3ds Max property sheet related.
And you should be using the VS2012 IDE, do you ?
I’m working with VS2010. And it says in the documentation that Max 2012 will work with VS2008 so I don’t assume that is the cause of the problem.
I’m trying to follow the “learning path” lessons, but even when I try to compile the sample solutions directly, I get the same error.
no – i simply missread your “I’m working with Max 2012 and Visual Studio 2010” as ” working with VS 2012 and VS 2010″ , which made me wonder why you should stick to the older IDE if you got the newer one installed…
regarding the “picking up vc9 directories ” : for Max 2012 those should be VC9
What is the platform toolset version set to in the General Project settings ? This should define the version being picked up at compile time. And according to the SDK requirements for Max 2012 this SHOULD be V90/VS2008 )
http://download.autodesk.com/global/docs/3dsmaxsdk2012/en_us/files/GUID-6E179A56-5552-4D0B-BA61-BBD37B9E52D-21.htm
quick google suggest your picking up vc9 directories
Open up Property Manager, if you selected the VC configuration then it should be on the left automatically. If not, you can find it either under View->Property Manager (it is near the bottom) or View->Other Windows->Property Manager. You will need a VC project loaded. In Property Manager, under <Project Name>->Debug | Win32 look for Microsoft.Cpp.Win32.User.
Right click on this and select properties. Go to Common Properties->VC++ Directories and check these out. But since these should inherit from the others directly then the best you can do is override the paths yourself here. The only thing that I could think of to override these is if you have VSINSTALLDIR and VCINSTALLDIR set on a global scale.
Could you look at one final thing, if you go to Control Panel->System->Advanced system settings and click on the Environment Variables button. Under either of these can you find VCINSTALLDIR and VSINSTALLDIR set to anything?
Huh. Okay, so actually I tried setting it to v100 and that seems to have solved the problem!
Is there anything I can do about absence of c++ IntelliSense in VisualStudio 2015upd3 ? It is enabled in cpp settings, but doesn’t work.
There’s nothing in solution explorer External dependencies folder but it somehow successfully builds my project in vs2015;
I created a test project in vs2010sp1 and it compiles well and IntelliSense is working and External dependencies folder is full of header files. I just can’t figure it out.