我想像这样组织 C 源代码:
+ /
|
|___ + ext
| |
| |___ + native_extension
| |
| |___ + lib
| | |
| | |___ (Source files are kept in here - may contain sub-folders)
| |
| |___ native_extension.c
| |___ native_extension.h
| |___ extconf.rb
|
|___ + lib
| |
| |___ (Ruby source code)
|
|___ Rakefile
我无法让此设置与mkmf
. native_extension/lib
中包含的文件native_extension.c
将被完全忽略。
当我构建扩展时,只native_extension.{h,c}
编译,我得到一个不完整native_extension.{so,dll}
的,当我尝试运行它时给我符号查找错误。
有什么办法可以使这项工作?