Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] ruby c extensions and straight skeletons

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] ruby c extensions and straight skeletons


Chronological Thread 
  • From: Stefan Salewski <>
  • To:
  • Subject: Re: [cgal-discuss] ruby c extensions and straight skeletons
  • Date: Tue, 08 Oct 2013 19:57:08 +0200

On Tue, 2013-10-08 at 18:39 +0200, Noel Warren wrote:
> I want to compile
> a Ruby C extension that uses some CGAL algorithms.

Compiles fine here -- without any changes:
This is for Ruby 1.9.3 and
gcc version 4.7.3 (Gentoo 4.7.3-r1 p1.3, pie-0.5.5)

stefan@AMD64X2 ~/tust $ cat extconf.rb
require 'mkmf'

if have_library("CGAL") and have_library("CGAL_Core") and
have_library("gmp")
$CFLAGS += " -frounding-math"
create_makefile("hello_world")
else
puts 'missing CGAL library'
end

ruby extconf.rb
checking for main() in -lCGAL... yes
checking for main() in -lCGAL_Core... yes
checking for main() in -lgmp... yes
creating Makefile
stefan@AMD64X2 ~/tust $ make
compiling rcgal_apollonius.cpp
compiling hello_world.cpp
linking shared-object hello_world.so

I did some Ruby CGAL bindings myself some time ago,
http://www.ssalewski.de/CDT.html.en
It works, but contains an error related to garbage collection and not
really nice code. I will fix that soon.
I think my latest Boost bindings are more clean,
http://www.ssalewski.de/RT.html.en
I am still learning...




Archive powered by MHonArc 2.6.18.

Top of Page