From 2c70a22c681335dcef4fd6aa84884422f2f2013b Mon Sep 17 00:00:00 2001 From: balr0g Date: Fri, 26 Jun 2015 00:09:39 -0400 Subject: [PATCH] Fix Windows build --- README | 8 ++++++++ poly2tri/sweep/sweep.cc | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/README b/README index cb24fd1..01b1d11 100644 --- a/README +++ b/README @@ -23,6 +23,14 @@ Dependencies Building the library ---------------------------------------------- +On Windows, follow the instructions here to set up your environment: +http://rexdouglass.com/python-64-bit-on-windows-part-2-building-packages/ + +Then to create a wheel package, run the following command: +python setup.py bdist_wheel +This will create a .whl package in dist/ directory which can then be redistributed. + +On Linux, you can do: python setup.py build_ext -i ---------------------------------------------- diff --git a/poly2tri/sweep/sweep.cc b/poly2tri/sweep/sweep.cc index bb4d828..c0b72d2 100644 --- a/poly2tri/sweep/sweep.cc +++ b/poly2tri/sweep/sweep.cc @@ -28,11 +28,15 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#define _USE_MATH_DEFINES + #include "sweep.h" #include "sweep_context.h" #include "advancing_front.h" #include "../common/utils.h" #include +#include #include