Re: function not found in DLL
I am sorry, that is a mistake. I changed the int params to SomeStruct to be
more generic, but forgot to change the interface functions declaration. To be
sure, SomeStruct can be templated classes.
It's best I list the actual class implementing the interface below. The
first encountered missing function is void
SetInitialLightRotation(quaternionf lightRotation).
class DLL_EXPORT RTRTwrapper : public PluginInterface
{
public:
RTRTwrapper();
virtual ~RTRTwrapper();
void initArgs( const int argc, char* argv[] );
void SetScene(SceneEnumType scene);
void SetIllumObs(ILLUM_OBS illumObs);
void LoadCgfxShaders();
void LoadCg(LPTSTR directory);
void LoadCgfx(LPTSTR directory);
void LoadOpenGLExtensions();
void LoadTextures(vector<const char*>& fileNames);
void LoadProceduralTextures(vector<const char*>& fileNames);
void Display();
void UpdateRotation(int deltax, int deltay, RotationEnumType rotation);
void UpdateWindowSize(int cx, int cy);
SceneEnumType GetScene();
ILLUM_OBS GetIllumObs();
void SetXYZFitValues(ffvec &C1, ffvec &C2,
fvec &albedo0, fvec &albedo1, fvec &albedo2);
void GetXYZFitValues(ffvec &C1, ffvec &C2,
fvec &albedo0, fvec &albedo1, fvec &albedo2);
void SetHertzogValues(ffvec &C1, ffvec &C2, fvec &aa, fvec &pn0, fvec &pn1,
fvec &pn2);
void GetHertzogValues(ffvec &C1, ffvec &C2, fvec &aa, fvec &pn0, fvec &pn1,
fvec &pn2);
void UpdateScale(int zDelta);
void SetExposure(double exposure);
void SetSeparation(double separation);
void SetViewConfig(quaternionf viewQuat, quaternionf modelQuat);
quaternionf GetViewConfig(bool bModel);
void UpdateTranslation(int deltaX);
void SetTranslation(double translation);
void SetScale(double scale);
double GetTranslation();
double GetScale();
void UpdateSampleFromColor(CMA98Color* color);
void SetHingeRotation(double rotation);
void UpdateHDREnvMap( const char* name);
void UpdateShapeSelection( const char* name);
void SetInitialLightRotation(quaternionf lightRotation);
const char *GetShape();
const char *GetEnvironment();
void LoadColorFromFile(const char *filename, const char *colorname);
public:
ControlManipulator* getManipulator();
protected:
RTRT* rtrt;
//ControlManipulator* manipulator;
};
"Giovanni Dicanio" wrote:
"BoHuang" <BoHuang@discussions.microsoft.com> ha scritto nel messaggio
news:19623A4E-698D-4905-B783-5C3AF7C6DA77@microsoft.com...
Class DLL_IMPORT_EXPORT MyInterface
{
Virtual void function1(int param) = 0;
Virtual void function2(int param) = 0;
};
Class DLL_IMPORT_EXPORT MyClass : public MyInterface
{
Void function1(SomeStruct param)
void function2(SomeStruct param)
Your problem may be that you change 'param' type, it is different in base
class MyInterface (where it is 'int') and in derived class MyClass (where it
is 'SomeStruct').
Moreover, I would not put the code inline in the header file when exporting
the class from the DLL.
Just use declarations in the header, and put the code in the .cpp files.
Giovanni