Community
Arnold for 3ds Max
Rendering with Arnold in 3ds Max using the MaxtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

#include "attributes/AttrHelper.h" lead to maya MNodeCLass dll missing

1 REPLY 1
Reply
Message 1 of 2
yjcnbnbnb200
222 Views, 1 Reply

#include "attributes/AttrHelper.h" lead to maya MNodeCLass dll missing

I wrote a maya shader node and want to make an extension for this node to make it renderable in Arnold, I use Visual Studio 2017 and Maya 2017 SP4, I have lib, include properly set, dll as output format, but once I include "NodeTranslator.h", my dll can't be compiled and shown error message below:

Arnold SDK version 5.0.2.0

error LNK2001: unresolved external symbol "__declspec(dllimport) public: class MNodeClass & __cdecl MNodeClass::operator=(class MNodeClass &&)" (__imp_??4MNodeClass@@QEAAAEAV0@$$QEAV0@@Z)
error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl MNodeClass::MNodeClass(class MNodeClass &&)" (__imp_??0MNodeClass@@QEAA@$$QEAV0@@Z)

Update : I found once a class defined by DLLEXPORT use a maya class like MNodeClass, this problem will occur, I thought during compiling, maya class tried to find a dynamic library, but it failed.

class DLLEXPORT CExtensionAttrHelper : public CBaseAttrHelper
{

public:
   /// @param mayaNodeClassName  name of maya class to add attributes to
   /// @param arnoldNodeEntry  arnold node entry to use when checking parameter metadata
   CExtensionAttrHelper(MString mayaNodeClassName, const AtNodeEntry* arnoldNodeEntry = NULL, const MString& prefix = "ai_", 
      bool addCommonAttributes = true) :
      CBaseAttrHelper(arnoldNodeEntry, prefix),
      m_class(mayaNodeClassName)
   {
      if (MTypeId(MFn::kInvalid) == m_class.typeId())
      {
         AiMsgWarning("[mtoa.attr] CExtensionAttrHelper was passed an unknown Maya node type \"%s\"",
                      mayaNodeClassName.asChar());
      }      
      if (addCommonAttributes)
         AddCommonAttributes();
   }
   /// @param mayaNodeClassName  name of maya class to add attributes to
   /// @param arnoldNodeEntryName  arnold node entry to use when checking parameter metadata
   CExtensionAttrHelper(MString mayaNodeClassName, const MString& arnoldNodeEntryName, const MString& prefix = "ai_", 
      bool addCommonAttributes = true) :
      CBaseAttrHelper(arnoldNodeEntryName, prefix),
      m_class(mayaNodeClassName)
   {
      if (MTypeId(MFn::kInvalid) == m_class.typeId())
      {
         AiMsgWarning("[mtoa.attr] CExtensionAttrHelper was passed an unknown Maya node type \"%s\"",
                      mayaNodeClassName.asChar());
      }
      /*
      FIXME : commenting out because of light portals which dump a warning here. Verify what has to be done !
      if (m_nodeEntry == NULL)
      {
         AiMsgWarning("[mtoa.attr] CExtensionAttrHelper was passed an unknown Arnold node type \"%s\" for Maya node type \"%s\"",
                      arnoldNodeEntryName.asChar(), mayaNodeClassName.asChar());
      }*/
      if (addCommonAttributes)
         AddCommonAttributes();
   }

   MString GetMayaNodeTypeName() const {return m_class.typeName();}

protected:   
   MStatus virtual addAttribute(MObject& attrib);

protected:
   void AddCommonAttributes();
   MNodeClass m_class;

};
Tags (2)
Labels (2)
1 REPLY 1
Message 2 of 2
yjcnbnbnb200
in reply to: yjcnbnbnb200

#include "extension/Extension.h" Maybe this one cause the problem...

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report