View Full Version : Visual C++ Express and SDK
mustan9 04-25-2007, 04:37 PM Hi,
Does the free Microsoft Visual C++ Express edition work with the 3D Studio Max 9 SDK?
|
|
ypuech
04-25-2007, 05:16 PM
Yes, it works. But the official development platform is Visual Studio 2005 Pro.
Also, there isn't a resource/dialog editor in the express version.
Yannick
Kameleon
05-11-2007, 12:14 PM
Well... it's not easy to setup for sure... I have Platform SDK installed, I've added the directories etc etc, including the Platform SDK MFC one, which was giving a linking error... but now... more errors :( Damn it, the same thing happened to me when trying to compile mr shaders... could do that also... it would be great for a compreensive tutorial on installing and configurating Max SDK + MR Shaders + VC ++ Express...
ypuech
05-11-2007, 03:37 PM
Well... it's not easy to setup for sure... I have Platform SDK installed, I've added the directories etc etc, including the Platform SDK MFC one, which was giving a linking error... but now... more errors :( Damn it, the same thing happened to me when trying to compile mr shaders... could do that also... it would be great for a compreensive tutorial on installing and configurating Max SDK + MR Shaders + VC ++ Express...
What is the link error you're having ?
Kameleon
05-11-2007, 03:42 PM
I get this error for example when linking the viewfile sample that comes with the SDK.
1>viewfile.obj : error LNK2019: unresolved external symbol __imp__MessageBoxA@16 referenced in function "public: void __thiscall ViewFile::View(struct HWND__ *)" (?View@ViewFile@@QAEXPAUHWND__@@@Z)
1>viewfile.obj : error LNK2019: unresolved external symbol __imp__wsprintfA referenced in function "public: void __thiscall ViewFile::View(struct HWND__ *)" (?View@ViewFile@@QAEXPAUHWND__@@@Z)
1>viewfile.obj : error LNK2019: unresolved external symbol __imp__SetCursor@4 referenced in function "public: void __thiscall ViewFile::View(struct HWND__ *)" (?View@ViewFile@@QAEXPAUHWND__@@@Z)
1>viewfile.obj : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function "public: void __thiscall ViewFile::View(struct HWND__ *)" (?View@ViewFile@@QAEXPAUHWND__@@@Z)
1>viewfile.obj : error LNK2019: unresolved external symbol __imp__LoadStringA@16 referenced in function "public: void __thiscall ViewFile::View(struct HWND__ *)" (?View@ViewFile@@QAEXPAUHWND__@@@Z)
1>..\..\..\maxsdk\plugin\viewfile.dll : fatal error LNK1120: 5 unresolved externals
ypuech
05-11-2007, 03:55 PM
Ok, all these symbols comes from the win32 API. You need to link user32.lib to the plugin.
Kameleon
05-11-2007, 04:01 PM
But I already have PlatformSDK\Lib in my VC++ Directories... user32.lib is there... strange no? I'm going to try it...
edit: Ok, I've just added user32.lib to the additional dependencies and it worked!!! But it's a strange error no? Care to explain a little bit ? Thank you very very much!
ypuech
05-12-2007, 09:54 PM
The Windows Platform SDK isn't included in Visual Studio 2005 Express. The dependencies by default are not set to link with Win32 libs : http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
Kameleon
05-14-2007, 09:55 AM
Thanks for the link!!! But now another question... how about compiling for 64 bit's? Express edition doesnt have the compilers/linkers for 64 bit but it seems PSDK has them included, how can I do 64 bit projects? Thanks once again.
ypuech
05-14-2007, 10:05 AM
I've never tried that (I use Professional Edition). Read this page and the first note : http://msdn2.microsoft.com/en-us/library/9yb4317s(VS.80).aspx (http://msdn2.microsoft.com/en-us/library/9yb4317s%28VS.80%29.aspx)
AlpineMan
05-15-2007, 11:01 AM
Please be aware if you want to compile plugins for 3dsmax, that you have to use the 8.0 Visual C++ compiler. You can buy it as a stand alone package from Microsoft for a greatly reduced price... compared to the full visual studio.
Not only that, you HAVE to install 1 hofixes for the compiler (from microsoft)... There is more information on the developers portal at autodesk.com.
Chris Johnson
d3coy
05-15-2007, 05:34 PM
Would it be at all possible to compile the SDK via an open source c++ IDE like Dev C++ or others? I'm a little ignorant on c++, but as far as I understand it just needs to link against all the libraries it uses, which should be a whole bunch of windows api libs. Are these libraries only available if you buy VC++? Is there something very special about the way Microsoft's c++ compiles? Or is there some hard-coded dependency on VC++ in the SDK source? Could that dependency be removed?
mustan9
05-15-2007, 05:37 PM
I think the SDK is using some .NET extensions or something that you have to implement, and that would be easier done with VC then a third-party. I've never known anyone to be able to create a plugin with something other then VC.
I have only been using C+ Express because the studio is to cheap to buy anything, but not having the dialog editor is enough for me to skip Express.
Kameleon
05-15-2007, 05:40 PM
But mustang, are you able to compile 64 bit plugins? And how about mentalray shaders?
d3coy
05-15-2007, 05:42 PM
I've never known anyone to be able to create a plugin with something other then VC.
Nor have I. I'm just wondering why the max SDK is so dependent on VC++, and whether or not that dependency could be removed so that smaller developers could have the opportunity to legally innovate with the kit.
mustan9
05-15-2007, 05:51 PM
But mustang, are you able to compile 64 bit plugins? And how about mentalray shaders?
No. You can not compile 64-bit with C++ Express, but it does support warnings if code is not 64-bit compliant. That's all it does for 64-bit.
Yes. I have compiled MR shaders with Express. The MR requirements are very basic and any C standard compiler for x86 should work. MR does not require C++ but just standard C extern calls.
I have also compiled shaders for Air, and RenderMan with Express and they appear to work.
mustan9
05-15-2007, 05:59 PM
Nor have I. I'm just wondering why the max SDK is so dependent on VC++, and whether or not that dependency could be removed so that smaller developers could have the opportunity to legally innovate with the kit.
VC++ uses a memory model that is different from other C compilers. It places extra debug information in the memory block for threads, and since plug-ins run in the same memory space as the application these have to be the same. That's why you can't run plug-ins compiled with older versions of VC.
One of the big design mistakes of 3D Studio Max's SDK is that there is no protected factory layer for the instancing of objects. Plug-ins are allowed to create their own instances of SDK objects, and then pass references back to 3D Studio Max to manage that instance. So you must create instances with the same memory managers as the application. 3D Studio Max would just crash is it had to manage an object created with some other compiler. Mind you, some will say it's possible but most likely not worth the risk.
The other big problem is debugging plug-ins while they are running in 3D Studio Max. You can't do that if your debugger uses a different memory model on threads.
Anyway, hope that helps answer your questions.
d3coy
05-15-2007, 07:08 PM
Ahh what a shame. Thanks for the enlightenment mustan9.
You can compile 64 bit with express and standard.
You just have to install a few extensions that are not installed by default.
(search google and you will find it)
-Kees
ypuech
05-15-2007, 11:06 PM
You can compile 64 bit with express and standard.
You just have to install a few extensions that are not installed by default.
(search google and you will find it)
-Kees
Here is an interesting page on MSDN : http://msdn2.microsoft.com/en-us/library/9yb4317s(VS.80).aspx
Thanks Yannick.
That's the page I used to get Standard to work for max plugins.
So I know it works :)
Kameleon
05-16-2007, 10:16 AM
Thanks ypuech, never saw that page, I did find a similar one but it didnt have instructions for Express Edition, only Standard. I'll take a look at it later, thanks alot for the suport and time to explain this stuff on this thread.
Btw kees I did search alot but maybe because I didnt know what to search exactly or just by having no luck I couldnt compile stuff, ypuech has been a great help by explaining and not by saying "google it" :)
I do read the help files, I do google before I ask any question. Thanks anyway :)
ypuech
05-16-2007, 03:28 PM
Thanks ypuech, never saw that page, I did find a similar one but it didnt have instructions for Express Edition, only Standard. I'll take a look at it later, thanks alot for the suport and time to explain this stuff on this thread.
Btw kees I did search alot but maybe because I didnt know what to search exactly or just by having no luck I couldnt compile stuff, ypuech has been a great help by explaining and not by saying "google it" :)
I do read the help files, I do google before I ask any question. Thanks anyway :)
Kees is a great help but maybe he doesn't have enough time to search the web...
Kameleon
05-16-2007, 03:35 PM
That's true and I appreciate very much every help, and I'm also aware of Kees work and maybe I missunderstood the "google it", anyway, it doesn't matter. I didnt want to be rude, just talking :)
No offense intended, Kameleon.
I couldn't remember where the page was and didn't have time to dig around.
I know its kinda hard to find the information, but I found it by googling :) .
I just quickly jumped in the thread to make sure nobody was wasting their hard earned dollars on buying professional when you don't need it.
So thanks to Ypuech for posting the direct link.
mustan9
07-29-2007, 08:34 PM
Hi guys.
I am re-opening this thread again.
I am trying to compile the "IntervalArray" sample that comes with the 3D Studio Max 9 SDK.
When I compile it I get "windows.h not found".
ypuech
07-30-2007, 08:47 AM
Make sure your include folders are well configured. I think "windows.h" is at last in the Platform SDK distribution.
mustan9
07-30-2007, 02:33 PM
Oh, that's why I can't find it.
Thanks, I'm downloading it right now! :)
CGTalk Moderation
07-30-2007, 02:33 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.