开发者

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

开发者 https://www.devze.com 2023-01-01 05:29 出处:网络
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 structur

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

精彩评论

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