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

Posted by mohawkjohn on Stack Overflow See other posts from Stack Overflow or by mohawkjohn
Published on 2010-05-23T04:59:13Z Indexed on 2010/05/23 5:10 UTC
Read the original article Hit count: 222

Filed under:
|
|
|

This is a follow-up question for: Multiple Ruby modules under one directory

What 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.

© Stack Overflow or respective owner

Related posts about c++

Related posts about ruby