summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2011-10-10 23:01:51 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2011-10-10 23:01:51 (GMT)
commita1c698f422fceeadcf50e2ad456d5e43a01c8feb (patch)
tree5b21483b358f6fc1905f865f7c29f3228cc4c4a6 /src
parent6251fc326842b657feb4926c9a4fbb51f152248c (diff)
enable build of cgalpngtest under windowsXP
Diffstat (limited to 'src')
-rw-r--r--src/dxfdata.h8
-rw-r--r--src/func.cc1
-rw-r--r--src/linalg.h4
-rw-r--r--src/linearextrude.cc1
4 files changed, 14 insertions, 0 deletions
diff --git a/src/dxfdata.h b/src/dxfdata.h
index d8dc3dd..04bcdd0 100644
--- a/src/dxfdata.h
+++ b/src/dxfdata.h
@@ -1,10 +1,14 @@
#ifndef DXFDATA_H_
#define DXFDATA_H_
+// workaround Eigen SIMD alignment problems
#ifndef __APPLE__
#define EIGEN_DONT_VECTORIZE 1
#define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT 1
#endif
+#ifdef _MSC_VER
+#define EIGEN_DONT_ALIGN
+#endif
#include <Eigen/Dense>
#include <vector>
@@ -35,7 +39,11 @@ public:
}
};
+#ifdef _MSC_VER
+ std::vector<Vector2d> points;
+#else
std::vector<Vector2d, Eigen::aligned_allocator<Vector2d> > points;
+#endif
std::vector<Path> paths;
std::vector<Dim> dims;
diff --git a/src/func.cc b/src/func.cc
index b011a27..75e90df 100644
--- a/src/func.cc
+++ b/src/func.cc
@@ -34,6 +34,7 @@
#include <algorithm>
#include "stl-utils.h"
#include <boost/foreach.hpp>
+#include "openscad.h" //M_PI
AbstractFunction::~AbstractFunction()
{
diff --git a/src/linalg.h b/src/linalg.h
index 02fa17f..b1e1409 100644
--- a/src/linalg.h
+++ b/src/linalg.h
@@ -1,10 +1,14 @@
#ifndef LINALG_H_
#define LINALG_H_
+// workaround Eigen SIMD alignment problems
#ifndef __APPLE__
#define EIGEN_DONT_VECTORIZE 1
#define EIGEN_DISABLE_UNALIGNED_ARRAY_ASSERT 1
#endif
+#ifdef _MSC_VER
+#define EIGEN_DONT_ALIGN
+#endif
#include <Eigen/Core>
#include <Eigen/Geometry>
diff --git a/src/linearextrude.cc b/src/linearextrude.cc
index 5c3b684..9c3557b 100644
--- a/src/linearextrude.cc
+++ b/src/linearextrude.cc
@@ -32,6 +32,7 @@
#include "builtin.h"
#include "PolySetEvaluator.h"
#include "openscad.h" // get_fragments_from_r()
+#include "mathc99.h"
#include <sstream>
#include <boost/assign/std/vector.hpp>
contact: Jan Huwald // Impressum