tamasmeszaros / libnest2d

2D irregular bin packaging and nesting library written in modern C++
GNU Lesser General Public License v3.0
315 stars 104 forks source link

Interfacing libnest2d from Ruby #11

Closed PatrickFranken closed 4 years ago

PatrickFranken commented 4 years ago

Hi @tamasmeszaros,

first of all thanks for the effort you put into libnest2d. It's actually something I was looking for for some time some. I'm trying to wrap the library into a Ruby library as all my other application is in Ruby. For this I'm using https://github.com/jasonroelofs/rice as it supports class binding to C++ classes. I managed to enable C++11 support but compiling fails with the following issue which is somehow caused by missing the Clipper library.

/usr/local/include/libnest2d/libnest2d.hpp:25:15: error: unknown type name 'PointImpl'
using Point = PointImpl;

Compiling the example provided by you works perfectly on my system using CMake. Could you provide an example on how to compile the example without CMake? That would be extremely helpful to mimic this in my makefiles.

Kind regards, Patrick

PatrickFranken commented 4 years ago

Looks like the Ruby header somehow mingle with Boost. Considering that I migrated to use FFI. Anyway, thanks for your contribution!