diff --git a/Mongoose/Include/Mongoose_Logger.hpp b/Mongoose/Include/Mongoose_Logger.hpp index 3479c8cdc..1efd7cc7a 100644 --- a/Mongoose/Include/Mongoose_Logger.hpp +++ b/Mongoose/Include/Mongoose_Logger.hpp @@ -103,23 +103,10 @@ typedef enum TimingType class Logger { private: - #ifdef MATLAB_MEX_FILE - // Compiling the Mongoose mexFunction inside MATLAB on Windows with the - // MSVC cl compiler (via the MATLAB mex command) causes an error, stating - // that private class members cannot be tagged with __declspec(...). - static int debugLevel; - static bool timingOn; - static double clocks[6]; - static float times[6]; - #else - // However, compiling the mongoose executable with the Windows cl compiler - // causes the mongoose.cpp executable to fail to link without the nasty - // __declspec(...) added below. MONGOOSE_API static int debugLevel; MONGOOSE_API static bool timingOn; MONGOOSE_API static double clocks[6]; MONGOOSE_API static float times[6]; - #endif public: static inline void tic(TimingType timingType); diff --git a/Mongoose/MATLAB/mongoose_make.m b/Mongoose/MATLAB/mongoose_make.m index 4de5b6e3d..5ec5e6a4c 100644 --- a/Mongoose/MATLAB/mongoose_make.m +++ b/Mongoose/MATLAB/mongoose_make.m @@ -38,6 +38,9 @@ function mongoose_make (run_test) % Append optimization flags = [flags ' -O -silent COPTIMFLAGS="-O3 -fwrapv"']; +% Append while building objects for shared library +flags = [flags ' -DMONGOOSE_BUILDING']; + cpp_flags = '' ; lib = ''; if (isunix)