开发者

How does one write extconf.rb files when one extension includes header files from another?

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜