Commit 62969a3f authored by peastman's avatar peastman
Browse files

Merge pull request #424 from smikes/vs2013-compile-errors

VS2013 compile errors
parents 25ea315c 8e3c539a
...@@ -552,7 +552,7 @@ ForceValidationResult* ValidateOpenMMForces::compareForce(Context& context, std: ...@@ -552,7 +552,7 @@ ForceValidationResult* ValidateOpenMMForces::compareForce(Context& context, std:
if( forceName.compare( "NA" ) == 0 ){ if( forceName.compare( "NA" ) == 0 ){
std::stringstream message; std::stringstream message;
message << "Force at index=" << ii << " not found -- aborting!"; message << "Force at index=" << ii << " not found -- aborting!";
std::cerr << message << std::endl; std::cerr << message.str() << std::endl;
throw OpenMM::OpenMMException(message.str()); throw OpenMM::OpenMMException(message.str());
} }
systemForceNameMap[forceName] = ii; systemForceNameMap[forceName] = ii;
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
*/ */
#if defined(_MSC_VER) #if defined(_MSC_VER)
#ifndef M_PI
#define M_PI 3.14159265358979323846264338327950288 #define M_PI 3.14159265358979323846264338327950288
#endif
#if _MSC_VER <= 1700 // 1700 is VC11, 1800 is VC12 #if _MSC_VER <= 1700 // 1700 is VC11, 1800 is VC12
/*************************** /***************************
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <cmath> #include <cmath>
#include <sstream> #include <sstream>
#include <utility> #include <utility>
#include <algorithm>
using namespace OpenMM; using namespace OpenMM;
using namespace std; using namespace std;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "openmm/kernels.h" #include "openmm/kernels.h"
#include <cmath> #include <cmath>
#include <vector> #include <vector>
#include <algorithm>
using namespace OpenMM; using namespace OpenMM;
using namespace OpenMM_SFMT; using namespace OpenMM_SFMT;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "openmm/kernels.h" #include "openmm/kernels.h"
#include <cmath> #include <cmath>
#include <vector> #include <vector>
#include <algorithm>
using namespace OpenMM; using namespace OpenMM;
using namespace OpenMM_SFMT; using namespace OpenMM_SFMT;
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#include <cmath> #include <cmath>
#include <map> #include <map>
#include <sstream> #include <sstream>
#include <algorithm>
using namespace OpenMM; using namespace OpenMM;
using namespace std; using namespace std;
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <set> #include <set>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include <algorithm>
using namespace OpenMM; using namespace OpenMM;
using namespace std; using namespace std;
......
...@@ -34,12 +34,19 @@ ...@@ -34,12 +34,19 @@
#include "openmm/internal/SplineFitter.h" #include "openmm/internal/SplineFitter.h"
#ifdef _MSC_VER #ifdef _MSC_VER
#if _MSC_VER < 1800
/** /**
* We need to define this ourselves, since Visual Studio is missing round() from cmath. * We need to define this ourselves, since Visual Studio is missing round() from cmath.
*/ */
static int round(double x) { static int round(double x) {
return (int) (x+0.5); return (int) (x+0.5);
} }
#else
#include <cmath>
#endif // MSC_VER < 1800
#else #else
#include <cmath> #include <cmath>
#endif #endif
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <string.h> #include <string.h>
#include <sstream> #include <sstream>
#include <complex> #include <complex>
#include <algorithm>
#include "SimTKOpenMMCommon.h" #include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h" #include "SimTKOpenMMLog.h"
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <cmath> #include <cmath>
#include <iostream> #include <iostream>
#include <cassert> #include <cassert>
#include <algorithm>
using namespace std; using namespace std;
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <cstring> #include <cstring>
#include <sstream> #include <sstream>
#include <algorithm>
#include "SimTKOpenMMCommon.h" #include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h" #include "SimTKOpenMMLog.h"
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <string.h> #include <string.h>
#include <sstream> #include <sstream>
#include <algorithm>
#include "SimTKOpenMMCommon.h" #include "SimTKOpenMMCommon.h"
#include "SimTKOpenMMLog.h" #include "SimTKOpenMMLog.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment