What calling conventions are used when compiling a ROOT dll. I got a problem inside my chisquare function which calls a function in the main (MFC) app. The second parameter is always put as value onto the stack and not as reference as mentioned in the function definition. The called function assumes a reference ang gets totally confused. Any help from ROOT forum possible?
The ROOT Dll is a fitting routine using minuit. It is constructed using Andrew Haas site as guide.
In the chisquare routine I have the line
fpFitObj->ToWorldFit (wcPos, wcAct, phik);
fpFitObj is an object of class CChip defined as follows
class CChip : public FitObj// : public CObject
{
public:
[snip]
virtual void ToWorldFit (WorldCoord& wcPos, const WorldCoord& wcAct, const double dPhi); //< virtual from class FitObj. Transform chip coords in world coords.
[snip]
CChip();
virtual ~CChip();
int m_iNumCoord;
protected:
WorldCoord m_wcChipOff; //< Relative position of rotation points in chip coordinates.
WorldCoord m_wcCam2Pos; //< Position of rotation center over camera 2 in world coords.
MotorCoord m_mcFirst; //< result of first call to GetCoord ()
MotorCoord m_mcMeasPos; //<
WorldCoord m_wcOffset; //<
list m_clCoord;
list m_clRef;
POINT m_pPtsFrame[5]; //< list of border frame points.
[snip]
};