Thanks Sebastien This kind of high-levle conflict is what I was worried about. I will then change #ifdef MATLAB to #ifdef MATLAB to #if defined(MATLAB_MEX_FILE) || defined(OCTAVE_MEX_FILE) Just to check, does then MATLAB_MEX_FILE and OCTAVE_MEX_FILE then apply to (i.e. is #defined for) all sources when being compiled for Matlab/Octave DLLs (e.g. inc. GeneralMatrix.cpp) or just to the main mexFunction files? Best regards George ----- Original Message ----- From: "Sébastien Villemot" <sebastien.villemot@ens.fr> To: "List for Dynare developers" <dev@dynare.org> Sent: Friday, November 20, 2009 10:42 AM Subject: Re: [DynareDev] printf in Vector and GeneralMatrix 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, -- Sébastien Villemot _______________________________________________ Dev mailing list Dev@dynare.org http://www.dynare.org/cgi-bin/mailman/listinfo/dev