我想这样组织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
Run Code Online (Sandbox Code Playgroud)
我无法让此设置正确使用mkmf。native_extension/lib中包含的中的文件native_extension.c,将被完全忽略。
构建扩展时,仅native_extension.{h,c}会进行编译,并且native_extension.{so,dll}在尝试运行扩展程序时出现不完整的符号查找错误。
有什么办法可以使这项工作吗?