Notifications
Clear all
[Closed] Where have lib file introduction?
Sep 01, 2010 10:18 am
it is my code, but i can not build it
return LNK2019 error and LNK1120 Error
I have set include and lib directory to maxsdk/include and maxsdk/lib
please help me,thank you
#include "Max.h"
#include "iparamb2.h"
#include "impexp.h"
#pragma comment(lib,"comctl32.lib")
#pragma comment(lib,"core.lib")
#pragma comment(lib,"paramblk2.lib")
#pragma comment(lib,"maxutil.lib")
#define SimpleCLASS_ID Class_ID(0xc2a1ee34, 0x832cc295)
class SimpleExporter;
class SimpleExporterClassDesc;
ClassDesc2* GetSimpleExporteClassDesc();
HINSTANCE hInstance = 0;
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
{
if( fdwReason == DLL_PROCESS_ATTACH )
{
hInstance = hinstDLL;
DisableThreadLibraryCalls(hInstance);
}
return(TRUE);
}
__declspec( dllexport ) const TCHAR* LibDescription()
{
static TCHAR buf[256];
if (hInstance)
return TEXT("Simple LibDescription");
return NULL;
}
__declspec( dllexport ) int LibNumberClasses()
{
return 1;
}
__declspec( dllexport ) ClassDesc* LibClassDesc(int i)
{
switch(i)
{
case 0:
return GetSimpleExporteClassDesc();
}
return 0;
}
__declspec( dllexport ) ULONG LibVersion()
{
return Get3DSMAXVersion();
}
__declspec( dllexport ) int LibInitialize()
{
return TRUE;
}
__declspec( dllexport ) int LibShutdown()
{
return TRUE;
}
class SimpleExporter : public SceneExport
{
public:
static HWND hParams;
int ExtCount();
const TCHAR * Ext(int n);
const TCHAR * LongDesc();
const TCHAR * ShortDesc();
const TCHAR * AuthorName();
const TCHAR * CopyrightMessage();
const TCHAR * OtherMessage1();
const TCHAR * OtherMessage2();
unsigned int Version();
void ShowAbout(HWND hWnd);
BOOL SupportsOptions(int ext, DWORD options);
int DoExport(const TCHAR *name,ExpInterface *ei,Interface *i, BOOL suppressPrompts=FALSE, DWORD options=0);
SimpleExporter ();
~SimpleExporter ();
};
class SimpleExporterClassDesc: public ClassDesc2
{
public:
virtual int IsPublic() { return TRUE; }
virtual void* Create(BOOL loading) { return new SimpleExporter(); }
virtual const TCHAR * ClassName() { return TEXT("Simple Exporter");}
virtual SClass_ID SuperClassID() { return SCENE_EXPORT_CLASS_ID; }
virtual Class_ID ClassID() { return SimpleCLASS_ID; }
virtual const TCHAR* Category() { return TEXT("Simple Exporter Category"); }
virtual const TCHAR* InternalName() { return TEXT("SimpleExporter"); }
virtual HINSTANCE HInstance() { return hInstance; }
};
static SimpleExporterClassDesc expoertDesc;
ClassDesc2* GetSimpleExporteClassDesc() { return &expoertDesc; }