【发布时间】:2017-01-09 20:06:33
【问题描述】:
as/400 ILE 允许将来自不同语言的过程编译成模块,然后绑定在一起形成一个程序。我正在尝试使用包含从我的 CL 模块(即入口模块)调用的 C 函数的模块来完成此操作。
C 模块源码: mylib/myfile/csource
int getValue(void){
return 20;
}
CL模块源码:mylib/myfile/clsource
pgm
dcl var(&NUM) type(*INT)
callprc prc(getValue) rtnval(&NUM) /* <== Calling C function. */
endpgm
然后我将每个文件编译成各自的模块。
crtcmod module(cmodule) srcfile(myfile) srcmbr(csource)
crtclmod module(clmodule) srcfile(myfile) srcmbr(clsource)
这两个编译,没问题。 只是,当我尝试从这两个模块创建程序时,ILE binder 抱怨 CL 源中的函数 getValue 未定义并且程序创建失败。
crtpgm pgm(mypgm) module(clmodule cmodule) entmod(clmodule) detail(*basic)
crtpgm 给我的错误:
Unresolved references........................: 1
Symbol Type Library Object Linked Name
*MODULE mylib clmodule *YES getValue
我错过了什么?
【问题讨论】:
标签: module call ibm-midrange procedure