A
Alex Gutteridge
Hi,
I'm trying to write an extension interfacing with the C iGraph
library (http://cneurocvs.rmki.kfki.hu/igraph/). Unfortunately the
iGraph header files define a macro called TYPE which clashes with the
TYPE macro defined in ruby.h. Both headers are obviously required to
compile my extension.
What is the best practice for dealing with name clashes like this? My
current solution is to do a search and replace in the iGraph source
changing TYPE to IGRAPH_TYPE and recompile the library. That works
for now, but implies anyone else wanting to build my extension will
have to manually hack iGraph themselves which seems a bit off. Am I
missing some obvious solution other than emailing iGraph/Ruby core
and asking for them to play a bit nicer with their names?
Alex Gutteridge
Bioinformatics Center
Kyoto University
I'm trying to write an extension interfacing with the C iGraph
library (http://cneurocvs.rmki.kfki.hu/igraph/). Unfortunately the
iGraph header files define a macro called TYPE which clashes with the
TYPE macro defined in ruby.h. Both headers are obviously required to
compile my extension.
What is the best practice for dealing with name clashes like this? My
current solution is to do a search and replace in the iGraph source
changing TYPE to IGRAPH_TYPE and recompile the library. That works
for now, but implies anyone else wanting to build my extension will
have to manually hack iGraph themselves which seems a bit off. Am I
missing some obvious solution other than emailing iGraph/Ruby core
and asking for them to play a bit nicer with their names?
Alex Gutteridge
Bioinformatics Center
Kyoto University