This is a follow-up question for: Multiple Ruby modules under one directory
Wh开发者_StackOverflow中文版at happens if these extensions include each other? For example, you have the following structure:
ext/foo
ext/bar
In ext/bar/bar.h
, you have a
#include "foo.h"
foo.h
and foo.cpp
compile to form foo.o
, to make life a little more complicated.
Finally, it is necessary that foo and bar be separate extensions.
How is this managed? I can't figure out how to add ../foo
to the search path for bar.h
, primarily. Symbolic links seem hack-ish.
you could use a mkrf_conf.rb file that does one then the other
https://github.com/rdp/ruby_tutorials_core/wiki/gem
精彩评论