Hi George,
Le vendredi 20 novembre 2009 à 10:33 +0000, G. Perendia a écrit :
I intend to change printf() calls in the <object>print() functions of some of the Dynare++ Sylv exceptions and Vector and GeneralMatrix to mexPrintf()and use following to switch between printf and mexPrintf()
#ifdef MATLAB #include "mex.h" #else #define mexPrintf printf #endif
Is that OK or will this cause any problems?
I think it's ok.
However note that in the main Dynare++ trunk, I removed the MATLAB define, and replaced it by MATLAB_MEX_FILE and OCTAVE_MEX_FILE.
So your #ifdef will need to be replaced by:
#if defined(MATLAB_MEX_FILE) || defined(OCTAVE_MEX_FILE)
Therefore I can not stress to much the need to make sure that your Dynare++ source tree doesn't diverge too much from the official Dynare++ tree in dynare++/ subdir.
Best,