So stuffed up
Hi,
I've got a nasty Link time error here
--------------------Configuration: try1 - Win32 Debug--------------------
Linking...
Creating library Debug/try1.lib and object Debug/try1.exp
try1.obj : error LNK2001: unresolved external symbol "public: virtual char *
__thiscall ClassDesc::GetRsrcString(long)"
(?GetRsrcString@ClassDesc@@UAEPADJ@Z)
D:\3dsmax7\plugins\try1.dle : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
try1.dle - 2 error(s), 0 warning(s)
/////////////////////////////////////////////////////////////////////////
In this,
I searched my folders to look for ClassDesc::GetRsrcString, as a result, I
found this...
class ClassDesc {
private:
Tab<FPInterface*> interfaces; // the FnPub interfaces published by this
plugin
public:
virtual ~ClassDesc() {}
virtual int IsPublic()=0; // Show this in create branch?
virtual void * Create(BOOL loading=FALSE)=0; // return a pointer to an
instance of the class.
virtual int BeginCreate(Interface *i) {return 0;}
virtual int EndCreate(Interface *i) {return 0;};
virtual const TCHAR* ClassName()=0;
virtual SClass_ID SuperClassID()=0;
virtual Class_ID ClassID()=0;
virtual const TCHAR* Category()=0; // primitive/spline/loft/ etc
virtual BOOL OkToCreate(Interface *i) { return TRUE; } // return FALSE
to disable create button
virtual BOOL HasClassParams() {return FALSE;}
virtual void EditClassParams(HWND hParent) {}
virtual void ResetClassParams(BOOL fileReset=FALSE) {}
// These functions return keyboard action tables that plug-ins can
use
virtual int NumActionTables() { return 0; }
virtual ActionTable* GetActionTable(int i) { return NULL; }
// Manipulator Interface
// Returns true of the class implements a manipulator object.
virtual BOOL IsManipulator() { return FALSE; }
// Returns true if the class is a manipulator and it
// manipulates the given reference targer which can be a base
// object, modifier or controller. When starting "Manipulate"
// mode, this is called on selected nodes for the base object,
// all modifiers, the TM controller and the position, rotation
// and scale controllers, if the TM controller is a
// PRSController.
virtual BOOL CanManipulate(ReferenceTarget* hTarget) { return
FALSE; }
// Returns true if the manipulator applies to the given node.
// This is general case if CanManipulateClassID isn't sufficient.
// This can be used to indicate that the manipulator works on a part
// of the node not covered by the cases mentioned above, such as the
// visibility controller.
virtual BOOL CanManipulateNode(INode* pNode) { return FALSE; }
// When a manipulator returns TRUE to CanManipulateClassID(),
// the system calls this version of CreateManipulator to
// create an instance. The hTarget passed is the object,
// modifier or controller that the manipulator said it could
// manipulate.
virtual Manipulator* CreateManipulator(ReferenceTarget* hTarget,
INode* pNode) {return NULL;}
// When a manipulator returns TRUE to CanManipulateNode(INode*),
// the system calls this version of CreateManipulator to
// create an instance.
virtual Manipulator* CreateManipulator(INode* pNode) {return NULL;}
// Class IO
virtual BOOL NeedsToSave() { return FALSE; }
virtual IOResult Save(ISave *isave) { return IO_OK; }
virtual IOResult Load(ILoad *iload) { return IO_OK; }
// bits of dword set indicate corrresponding rollup page is closed.
// the value 0x7fffffff is returned by the default implementation so the
// command panel can detect this method is not being overridden, and just
leave
// the rollups as is.
virtual DWORD InitialRollupPageState() { return 0x7fffffff; }
// ParamBlock2-related metadata interface, supplied & implemented in
ClassDesc2 (see maxsdk\include\iparamb2.h)
virtual const TCHAR* InternalName() { return NULL; }
virtual HINSTANCE HInstance() { return NULL; }
// access parameter block descriptors for this class
virtual int NumParamBlockDescs() { return 0; }
virtual ParamBlockDesc2* GetParamBlockDesc(int i) { return NULL; }
virtual ParamBlockDesc2* GetParamBlockDescByID(BlockID id) { return
NULL; }
virtual void AddParamBlockDesc(ParamBlockDesc2* pbd) { }
// automatic UI management
virtual void BeginEditParams(IObjParam *ip, ReferenceMaker* obj, ULONG
flags, Animatable *prev) { }
virtual void EndEditParams(IObjParam *ip, ReferenceMaker* obj, ULONG
flags, Animatable *prev) { }
virtual void InvalidateUI(ParamBlockDesc2* pbd) { }
CoreExport virtual TCHAR* GetRsrcString(INT_PTR id) { return
_T("Dummy"); } // Added by Jacky
// automatic ParamBlock construction
virtual void MakeAutoParamBlocks(ReferenceMaker* owner) { }
// access automatically-maintained ParamMaps, by simple index or by
associated ParamBlockDesc
virtual int NumParamMaps() { return 0; }
virtual IParamMap2* GetParamMap(int i) { return NULL; }
virtual IParamMap2* GetParamMap(ParamBlockDesc2* pbd) { return NULL; }
// maintain user dialog procs on automatically-maintained ParamMaps
virtual void SetUserDlgProc(ParamBlockDesc2* pbd, ParamMap2UserDlgProc*
proc=NULL) { }
virtual ParamMap2UserDlgProc* GetUserDlgProc(ParamBlockDesc2* pbd) {
return NULL; }
// Class can draw an image to represent itself graphically...
virtual bool DrawRepresentation(COLORREF bkColor, HDC hDC, Rect &rect) {
return FALSE; }
// Function Publishing interfaces - jbw 3.13.00
virtual int NumInterfaces() { return interfaces.Count(); }
virtual FPInterface* GetInterfaceAt(int i) { return interfaces[i]; }
CoreExport virtual FPInterface* GetInterface(Interface_ID id);
CoreExport virtual FPInterface* GetInterface(TCHAR* name);
CoreExport virtual void AddInterface(FPInterface* fpi);
virtual void ClearInterfaces() { interfaces.ZeroCount(); }
// This method can be used for further categorizing plugin's. If a plugin
has
// sub-plugins(like light > shadows, particles > operators), this method
can be
// used to differentiate them. sub-plugins can be derived off reference
target
// but return a particular class ID published by the parent plugins SDK
headers.
// Then parent plugin can get a list of all reference targets whose
SubClassID
// matches the published SubClassID
virtual Class_ID SubClassID() { return Class_ID(); }
// Generic expansion function
virtual INT_PTR Execute(int cmd, ULONG_PTR arg1=0, ULONG_PTR arg2=0,
ULONG_PTR arg3=0) { return 0; }
};
////////////////////////////////////////////
I've put all lib names provided by discreet into the "Link section" of VC++
6.0
Then I recklessly put a dummy return values to that line of GetRsrcString
because today is so hot
And I think "virtual" keyword can let all derived classes use my default
implementation. But still got link time error
So any help would be greatly appreciated.... Have to do my work in an
oven.....
Thanks
Jack