Coder Social home page Coder Social logo

Comments (7)

cgohlke avatar cgohlke commented on August 30, 2024

triangle.c uses C long type to store pointer addresses. On Windows, that will work for 32 bit binaries, but it is not correct for 64-bit. With the old VS2008 CRT you might get away with that depending on the application/use, but not with the new UCRT used by Python >=3.5.

from triangle.

drufat avatar drufat commented on August 30, 2024

I am not using Windows so there is no way for me to test this, but if you would like to submit a pull request which fixes the issue for Windows users, I will gladly merge it.

from triangle.

cgohlke avatar cgohlke commented on August 30, 2024

Without unit tests I don't feel confident to submit a PR.

There's a patch at wo80/Triangle@6a87bb0. That project also contains other improvements/changes to the triangle library.

from triangle.

cedh4c avatar cedh4c commented on August 30, 2024

I hate the new UCRT so much... I'm currently tied to Windows but will switch my project to Linux as soon as I can. I've tried to do mods to make it work with UCRT (py35 and py36) but I've already wasted enough time on UCRT and will leave it for later. If I make progress on this, I'll come back to report.

I can confirm this repo works with py34 on Windows, as is.

I'm a bit confused regarding this wo80 repository. There seem to be an "original" Triangle static library, which differs a lot from what is used in this present repo (drufat's). Then, there is the dynamic API, which sounds quite appealing although it will take some work to get the python bindings done.

By the way, cgohlke, I must thank you for your fantastic binary library page for Python. It's been (and continues to be) extremely useful. Similarly, drufat, thanks a lot for these bindings.

from triangle.

cgohlke avatar cgohlke commented on August 30, 2024

@cedh: please try the new builds at http://www.lfd.uci.edu/~gohlke/pythonlibs/#triangle. They are using unsigned long long instead of unsigned long for handling pointers on 64-bit. I'll submit a PR if this fixes your issues.

from triangle.

cedh4c avatar cedh4c commented on August 30, 2024

@cgohlke I just tried and it looks like it works both in py35 and py36. Thanks so much!

I did try to replace the unsigned long but made the mistake of using ULONG_PTR that I found somewhere in msdn... It caused me problems of undefined symbol because cl couldn't find the right headers for some reason (go figure, the path to the correct include dir was there). It was the last straw after a week end of dealing with other libraries breaking in py35/6 because of the new UCRT. But I learned something today regarding the unsigned long long, so not a complete waste!

from triangle.

cgohlke avatar cgohlke commented on August 30, 2024

Should be fixed by PR #18

from triangle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.