如何在project中写入module函数并在其他文件中调用

如下图所示,在这个模块管理的问题中,test是一个project,hello.dos在其下面的modules文件夹中,请问hello文件中的module语句要怎么写

attachments-2023-01-4xNySkQc63bbed9051395.png

上传已成功,系统提示:

Successfully synchronized /mnt/sda/dolphindb/dolphindbServer/server/clusterDemo/data/cnode1/modules/hello.dos

模块代码如下所示:

attachments-2023-01-rIfamMBB63bbed99325db.png

在另一个文件use hello,却显示找不到这个模块。

请先 登录 后评论

1 个回答

levenew

需要把hello.dos放到ta.dos的同个目录下:

/mnt/sda/dolphindb/dolphindbServer/server/modules/

并在GUI中设置remotedirectory为这个目录。

如果设置之后getHomeDir变成该目录,但是use还是不行,可能是因为 modules目录设置了多个,只保留一个即可。

比如若使用了这个目录:

/mnt/sda/dolphindb/dolphindbServer/Server/clusterDemo/data/cnode1/modules/

就需要把/dolphindbServer/server/modules/删除,然后重启节点。

请先 登录 后评论