Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calling DLL from QM
#1
Hi Gintaras,

I've defined a DLL in C++ with the following header:

Macro Macro108
Code:
Copy      Help
// Math.h

#ifdef MATH_EXPORTS
#define MATH_API __declspec(dllexport)
#else
#define MATH_API __declspec(dllimport)
#endif

namespace Math
{
,// This class is exported from the Math.dll
,class MathFuncs
,{
,,public:
,,// Returns a + b
,,static MATH_API double Add(double a, double b);
,,
,,// Returns a - b
,,static MATH_API double Subtract(double a, double b);
,,
,,// Returns a * b
,,static MATH_API double Multiply(double a, double b);
,,
,,// Returns a / b
,,// Throws const std::invalid_argument& if b is 0
,,static MATH_API double Divide(double a, double b);
,};
}
What is the proper syntax to call it using QM?

Note: the DLL file name is "Math.dll"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)