Announcement

Collapse
No announcement yet.

Plugin samples won't open/build in Visual Studio 2010

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Plugin samples won't open/build in Visual Studio 2010

    I have installed V-Ray (3DSMax 2014 for x64) and am trying to build the included 3DSMax plugin samples found in the 'samples/3dsmax_plugins' directory of the installation, but these files appear to be very outdated. They will not build successfully with the currently available Visual Studio Express 2010 or 2013 software packages.

    It appears that the VRay SDK lib files are built with Visual Studio Express 2010. Has anyone successfully built these samples in Visual Studio 2010 or 2013 with the current VRay libs?

  • #2
    The files build fine with VS 2010 and 2012. Can you tell me which file you are trying to build? I can walk you through a step-by-step setup for it.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      I'm most interested in the VRayDomeCamera sample so I've started there. I have made some progress since first posting:

      - installed Windows7.1SDK so that I could build that platform toolset within Visual Studio Express 2013
      - updated the various paths and lib inclusions in the vraydomecamera project file
      - Autodesk\3ds Max 2014 SDK\include
      - Chaos Group\V-Ray\3dsmax 2014 for x64\include
      - Autodesk\3ds Max 2014 SDK\lib\x64\Release
      - Chaos Group\V-Ray\3dsmax 2014 for x64\lib\x64
      - Chaos Group\V-Ray\3dsmax 2014 for x64\lib\x64\vc101
      - change vrender90.lib to vrender2013.lib
      - change vray90.lib to vray2013.lib

      That got me to this error: 'error LNK2001: unresolved external symbol LibDescription' (resulting from 'warning LNK4022: cannot find unique match for symbol 'LibDescription''), which I got around by removing the ./plugin.def from the project's 'Module Definition File' entry.

      Now I'm to a whole slew of other unresolved external symbol errors:

      Code:
      Error	1	error LNK2019: unresolved external symbol "__declspec(dllimport) class IParamMap2 * __cdecl CreateCPParamMap2(short,class IParamBlock2 *,class Interface *,struct HINSTANCE__ *,struct DLGTEMPLATE *,char const *,unsigned long,class ParamMap2UserDlgProc *,struct HWND__ *,int)" (__imp_?CreateCPParamMap2@@YAPEAVIParamMap2@@FPEAVIParamBlock2@@PEAVInterface@@PEAUHINSTANCE__@@PEAUDLGTEMPLATE@@PEBDKPEAVParamMap2UserDlgProc@@PEAUHWND__@@H@Z) referenced in function "class IParamMap2 * __cdecl CreateCPParamMap2(class IParamBlock2 *,class Interface *,struct HINSTANCE__ *,struct DLGTEMPLATE *,char const *,unsigned long,class ParamMap2UserDlgProc *,struct HWND__ *,int)" (?CreateCPParamMap2@@YAPEAVIParamMap2@@PEAVIParamBlock2@@PEAVInterface@@PEAUHINSTANCE__@@PEAUDLGTEMPLATE@@PEBDKPEAVParamMap2UserDlgProc@@PEAUHWND__@@H@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	2	error LNK2001: unresolved external symbol "public: virtual char const * __cdecl ClassDesc::GetRsrcString(__int64)" (?GetRsrcString@ClassDesc@@UEAAPEBD_J@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	3	error LNK2001: unresolved external symbol "public: virtual class FPInterface * __cdecl ClassDesc::GetInterface(char const *)" (?GetInterface@ClassDesc@@UEAAPEAVFPInterface@@PEBD@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	4	error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl MaxSDK::Util::OutOfRangeException::OutOfRangeException(char const *)" (__imp_??0OutOfRangeException@Util@MaxSDK@@QEAA@PEBD@Z) referenced in function "public: __cdecl MaxSDK::Util::TabOutOfRangeException::TabOutOfRangeException(char const *)" (??0TabOutOfRangeException@Util@MaxSDK@@QEAA@PEBD@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	5	error LNK2001: unresolved external symbol "public: virtual void __cdecl ReferenceTarget::GetClassName(class CStr &)" (?GetClassName@ReferenceTarget@@UEAAXAEAVCStr@@@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	6	error LNK2001: unresolved external symbol "public: virtual class CStr __cdecl Animatable::SubAnimName(int)" (?SubAnimName@Animatable@@UEAA?AVCStr@@H@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	7	error LNK2001: unresolved external symbol "public: virtual class CStr __cdecl Animatable::NodeName(void)" (?NodeName@Animatable@@UEAA?AVCStr@@XZ)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	8	error LNK2001: unresolved external symbol "public: virtual class CStr __cdecl Object::SvGetName(class IGraphObjectManager *,class IGraphNode *,bool)" (?SvGetName@Object@@UEAA?AVCStr@@PEAVIGraphObjectManager@@PEAVIGraphNode@@_N@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	9	error LNK2001: unresolved external symbol "public: virtual bool __cdecl Animatable::SvSetName(class IGraphObjectManager *,class IGraphNode *,class CStr const &)" (?SvSetName@Animatable@@UEAA_NPEAVIGraphObjectManager@@PEAVIGraphNode@@AEBVCStr@@@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	10	error LNK2001: unresolved external symbol "public: virtual class CStr __cdecl Animatable::SvGetTip(class IGraphObjectManager *,class IGraphNode *)" (?SvGetTip@Animatable@@UEAA?AVCStr@@PEAVIGraphObjectManager@@PEAVIGraphNode@@@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	11	error LNK2001: unresolved external symbol "public: virtual class CStr __cdecl Animatable::SvGetRefTip(class IGraphObjectManager *,class IGraphNode *,class IGraphNode *)" (?SvGetRefTip@Animatable@@UEAA?AVCStr@@PEAVIGraphObjectManager@@PEAVIGraphNode@@1@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	12	error LNK2001: unresolved external symbol "public: virtual class CStr __cdecl Animatable::SvGetRelTip(class IGraphObjectManager *,class IGraphNode *,int,class IGraphNode *)" (?SvGetRelTip@Animatable@@UEAA?AVCStr@@PEAVIGraphObjectManager@@PEAVIGraphNode@@H1@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	13	error LNK2001: unresolved external symbol "public: virtual int __cdecl BaseObject::OKToChangeTopology(class CStr &)" (?OKToChangeTopology@BaseObject@@UEAAHAEAVCStr@@@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	14	error LNK2001: unresolved external symbol "public: virtual void __cdecl Object::GetCollapseTypes(class Tab<class Class_ID> &,class Tab<class CStr *> &)" (?GetCollapseTypes@Object@@UEAAXAEAV?$Tab@VClass_ID@@@@AEAV?$Tab@PEAVCStr@@@@@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	15	error LNK2019: unresolved external symbol "__declspec(dllimport) public: static struct DLGTEMPLATE * __cdecl Pb2TemplateGenerator::GenerateTemplate(class IParamBlock2 *,char const *,int)" (__imp_?GenerateTemplate@Pb2TemplateGenerator@@SAPEAUDLGTEMPLATE@@PEAVIParamBlock2@@PEBDH@Z) referenced in function "public: virtual void __cdecl VRayCamera::BeginEditParams(class IObjParam *,unsigned long,class Animatable *)" (?BeginEditParams@VRayCamera@@UEAAXPEAVIObjParam@@KPEAVAnimatable@@@Z)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	16	error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl ParamBlockDesc2::ParamBlockDesc2(short,char const *,__int64,class ClassDesc2 *,unsigned short,...)" (__imp_??0ParamBlockDesc2@@QEAA@FPEBD_JPEAVClassDesc2@@GZZ) referenced in function "void __cdecl `dynamic initializer for 'camera_param_blk''(void)" (??__Ecamera_param_blk@@YAXXZ)	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydomecamera.obj	vraydomecamera
      Error	17	error LNK1120: 16 unresolved externals	C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\x64\Max Release Official\vraydomecamera.dll	vraydomecamera
      	18	IntelliSense: incomplete type is not allowed	c:\Program Files\Autodesk\3ds Max 2014 SDK\include\ifnpub.h	324	32	vraydomecamera
      	19	IntelliSense: identifier "LifetimeType" is undefined	c:\Program Files\Autodesk\3ds Max 2014 SDK\include\ifnpub.h	385	2	vraydomecamera
      I'd be grateful for any help you can offer.

      Comment


      • #4
        Firstly, building for 3ds Max 2013/2014 requires Visual Studio 2010. From then on, follow these steps:

        *) Open Visual Studio 2010;
        *) Open "C:\Program Files\Chaos Group\V-Ray\3dsmax 2014 for x64\samples\3dsmax_plugins\vraydomecamera\vraydome camera.dsp";
        *) Visual Studio will ask you to upgrade the project, click OK;
        *) Right-click on the "vraydomecamera" project in the Solution Explorer, choose Properties;
        *) Click on the "Configuration Manager" button;
        *) In the "Configuration" column, click on the "Debug" configuration and change to "Max Release Official";
        *) In the "Platform" column, click on "Win32" and select "<New...>, then choose "x64" and leave "Copy settings from" to "Win32";
        *) Click on the "C/C++" section on the right in the project properties; replace "k:\3dsmax\maxsdk2013\include" with the path to the 3ds Max 2013/2014 SDK include folder;
        *) Click on the "Linker" section and replace "k:\3dsmax\maxsdk2013\Lib\x64" with the 3ds Max 2013/2014 lib folder.

        That should be all. There shouldn't be vrender90.lib nor vray90.lib in the project - the correct V-Ray libraries should be already listed.

        As a side note, the errors you are getting are probably because you started from the "Debug" configuration rather than the "Max Release Official" one and the 3ds Max libraries (core.lib, paramblk2.lib etc) are not specified in the "Input" section of the "Linker" settings.

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment


        • #5
          For some reason, after telling Visual Studio 2010 to convert the project file, the window disappears, but never seems to actually convert the project (no project is loaded in the GUI and no changes appear to be stored to the file system). I'll poke around to see why this might be.

          However, by just opening the existing vraydomecamera.dsp file in a text editor, I can clearly search for and find lots of references to ...90 libs instead of ...2013 (for both 3ds and vray entries). Is there an installation of VRay that has a different set of sample files? The ones I'm working with were installed by the latest max 2014 installer, so I'm a bit of a loss as to why my sample files would reference something so out of date. Is there somewhere you can upload your set of sample files?

          Comment


          • #6
            I was able to follow the suggested route into Visual Studio 2010 by way of VS2005 first, but I still end up at the same place. Even with the project imported into VS2010, I had to change references to ...90 libs to ...2013 libs. Which led me to the same result as I had in VS2013. I am left with a slew of linker errors that I strongly suspect are due to slightly different method signatures in the newer 3DS SDK libs.

            Bottom line = I've wasted an entire day because the plugin samples directory installed by the latest VRay installer does not contain the correct, updated files.

            Can someone please point me to where I can get the current files (I tried downloading and installing a few different installations from the download site and all had old sample files)?

            Comment


            • #7
              Hmm, which V-Ray version did you install? Everything seems fine on my end. In any case, email me to vlado@chaosgroup.com and I'll get you the full project.

              Best regards,
              Vlado
              I only act like I know everything, Rogers.

              Comment


              • #8
                Thanks for being so generous with your help.

                I installed a few different VRay versions from the download site (I'm positive that I at least tried vray_adv_24004_max2014_x64.exe and vray_adv_24003_max2013_x86.exe, didn't keep track of others). If you install either of these, do you get up to date samples? This discrepancy is very confusing to me.

                Anyway, regardless, it would be awesome if you could provide the version of the plugin samples that you have (emailed you).

                Comment


                • #9
                  I have the same problems when building the examples for 3ds max 2014 installed from the latest installer "vray_adv_30007_max2014_x64.exe".

                  The project files are from Visual Studio 6 and the examples aren't up-to-date to the latest V-Ray SDK getting build error because of some missing files.

                  Why are the examples aren't updated for Visual Studio 2010 and 3ds max 2014? Will they eventually be updated?

                  Also some links are broken in the documentation e.g. the file "vrayclasses.chm" is missing.

                  Regards,
                  Ralf Reichl

                  Comment


                  • #10
                    There is a step-by-step guide how to open the projects here:
                    http://docs.chaosgroup.com/display/V...lingtheSamples

                    vrayclasses.chm is indeed missing; not sure why. I will upload it here a bit later.

                    We do not really have updated projects; our build system works directly with the .dsp files. It is on the "to do" list to make a converter to .vcproj files, but we haven't had time to look into that yet.

                    Best regards,
                    Vlado
                    I only act like I know everything, Rogers.

                    Comment


                    • #11
                      I have tried to build two samples as described above:


                      1. vraystereoscopic

                      At least the following include files are missing:

                      #include "camerasampler.h"

                      #include "../vrayphysicalcamera/pb2enumphysicalcamera.h"


                      2. exposurectrl

                      All of the following include folders doesn't exists anywhere on my machine assuming that these should be part of the V-Ray SDK. I know that I have to replace M:\ by some suitable folder.

                      M:\vraysdk\include
                      M:\utils\iutils\include
                      M:\vray\vrender\src
                      M:\utils
                      M:\utils\vutils\include
                      M:\utils\putils\include
                      M:\vray\vray\src

                      Can you tell me which of the many examples will build correctly after the above modification?

                      Regards,
                      Ralf Reichl

                      Comment


                      • #12
                        You can get the following samples to compile (which I just verified one by one):

                        multimatte
                        vray2sidedmtl
                        vrayblendmtl
                        vrayblinnmtl
                        vraybump2normal
                        vraycolor
                        vraycomptex
                        vraydirt
                        vraydomecamera
                        vraydomeenv
                        vrayfur
                        vraygimtl
                        vrayicc
                        vraylut
                        vraymeshgeom
                        vraymultimap
                        vrayoutputtest
                        vrayplane
                        vraypointparticlemtl
                        vraysamplerinfotex
                        vrayspherefade
                        vraystereorig
                        vraytexlight
                        vraytoon

                        Best regards,
                        Vlado
                        I only act like I know everything, Rogers.

                        Comment


                        • #13
                          Hello,

                          Here is the vrayclasses.chm that should have come with the installations.

                          Best regards,
                          Alexander
                          Attached Files
                          Alexander Kazandzhiev
                          V-Ray for 3ds Max developer

                          Comment


                          • #14
                            Hello,

                            Thanks a lot.

                            The file "vrayplugins.chm" seems to be missing too.

                            And all the files:

                            class_RayServerInterface.html

                            class_GeometryGenerator.html

                            class_InfiniteRootPrimitive.html

                            class_StaticRootPrimitive.html

                            class_MovingRootPrimitive.html

                            class_GenericPrimitive.html

                            class_InfinitePrimitive.html

                            class_StaticPrimitive.html

                            class_MovingPrimitive.html

                            class_RSRay.html

                            struct_RSIntersection.html

                            vrayshade.html

                            supportclasses.html

                            Best regards,
                            Ralf Reichl

                            Comment


                            • #15
                              vrayplugins.chm is irrelevant for 3ds Max development.

                              The other files are legacy and need to be removed, along with all links to them. All the respective info has been moved to vrayclasses.chm

                              Best regards,
                              Vlado
                              I only act like I know everything, Rogers.

                              Comment

                              Working...
                              X