我已经按照other similar questions的所有步骤进行操作,但我仍然受阻。
我需要使用the function proc_pidpath
in libproc.h
来通过其PID获取BSD进程的路径。但是,libproc.h
不是模块化标头,因此无法将其包含在伞形标头中:
足够公平;现在我尝试将其包含在我的模块图中:
framework module My_Modular_Framework {
umbrella header "My_Modular_Framework.h"
private header "/usr/include/libproc.h"
export *
module * { export * }
}
现在我得到了这个错误提示,它似乎认为我的项目中包含许多系统模块/标头:
我不知道该怎么办。就像我说的那样,我已经尝试按照other similar questions的所有步骤进行操作,但都没有成功。 在这里可以做什么?如何使用proc_pidpath
?是否还有另一种更容易在模块化框架中使用Swift的方法来从进程ID获取路径?
我不想启用“在框架模块中允许非模块化包含”,因为这违反了模块化框架的目的。