Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
DrTimothyAldenDavis committed Jun 13, 2024
1 parent db3773a commit 9280868
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Mongoose/Include/Mongoose_Logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,23 @@ 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);
Expand Down

1 comment on commit 9280868

@DrTimothyAldenDavis
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title of this commit was a typo. I typed 'git add .' first, and then typed in the dot again on the commit -m message. The title should be more descriptive, like "do not use __declspec when compiling a MATLAB mexFunction".

Please sign in to comment.