gilbo / cork

3D Boolean / CSG Library
Other
406 stars 173 forks source link

exception thrown on visual studio2017+windows10_x64 during computeing Difference with ballA\ballB #40

Closed samyuchao closed 6 years ago

samyuchao commented 6 years ago

with win32, it is successful to do all commands. with x64, building is successful, and run into computeDifference(...), but exception thrown during computeing Difference with ballA\ballB. Is there any special setting on x64? image

danilopeixoto commented 6 years ago

I solved this problem by replacing unsigned long type (declared in the triangle.c file to represent pointer data) with unsigned __int64 type. The unsigned long is the size of 4 bytes and unsigned __int64 is 8 bytes (https://msdn.microsoft.com/en-us/library/s3f49ktz.aspx). Try to use 8 bytes to store pointer data.