[Closed] C++ compilation problem
This is my first C++ plugin. I’m extremely familiar with C#, but not C++, but it’s not too hard to get the hang of. I started with BerconMaps as a reference point on how to do a Texmap, and the only compilation error i’m getting is:
IntelliSense: invalid redeclaration of member function “BitArray::NumberSetProxy::operator DWORD_PTR() const” (declared at line 96) c:\program files (x86)\autodesk\autodesk 3ds max 2011 sdk\maxsdk\include\bitarray.h 107 11
The piece of code from the BitArray header in question is:
#ifdef WIN64
inline operator DWORD() const
{
return mArray.NumberSetImpl();
}
#endif
I’ve checked compile settings between Bercon and my projects, it’s compiling for Max 2011 64.
Apologies – I wasn’t “wired” over the weekend. Stupidly enough I haven’t actually checked that. It works at home but that’s no reason to think it would work here. I’ll give it a shot!
Checked at work – no cigar (same error). It’s VS2010 on Win7 64. I ensured both work and home targeted the same SDK and its still the case that its ok at home but not at work. Weird.
Right, this occurs when compiling the SDK samples themselves in Release mode, x64.
What.
He says one post above he’s using VS2010.
If you’re trying to compile a Max 2011 plugin, you should really be using VS2008, as that is the compiler version that all of the libraries in the SDK were compiled with. You can still do it with VS2010, but you need to set the target version in the project configuration to v90, and you need to have VS2008 (or rather the linker and libs for that version) on your drive. You’ll also need to tell VS2010 where it can find them.
Otherwise I’m not sure what the problem might be, I’ve never had it happen here.
Dave
IIRC, you can compile all versions with vs2010 under v100 as long as the user installs the v100 redistributables.
It seems it is a lack of VS2008. Do I need to install the whole thing or just some libs?