How can I add method to OCCVIewer.h with C# (usual way didn't work)

I'm working based on OCC6.3 amd Visual Studio 2005 C#

this is an example of OCC C#example file


__declspec(dllexport) void TopView(void);

What does "__declspec(dllexport)" mean?

I tried usual way to add method but it didn't work.
And I just coded
__declspec(dllexport) MyMethod(void);
to OCCViewer.h
but I couldn't get MyMethod() in OCCViewer.cpp

Anybody can help me?

Pawel's picture

Hi Yonguk

What do you mean by the "usual way"?

Make sure you provide a return type for your method (e.g. __declspec(dllexport) void MyMethod(void);) and that you provide the implementation in the OCCViewer.cpp file.