erlang - 为导入的模块生成 .beam 文件
问题描述
我正在学习 erlnag,对“.beam”文件的创建有一点疑问。例如,我有 helloworld.erl 和 top.erl 文件,并且 helloworld.erl 被导入到 top.erl 中。
顶部.erl:
-module(top).
-import(helloworld, [start/0]).
-export([main/0]).
main() ->
io:fwrite("hello\n"),
start().
helloworld.erl
-module(helloworld).
-export([start/0]).
start() ->
io:fwrite("hello world\n").
然后使用“erlc top.erl”编译top.erl。然后,它只创建top.beam文件,而不是创建helloworld.beam文件。
但是当我们看到在python和java的情况下,在编译导入文件时也会为导入的文件生成目标文件。
这是'erlang'的行为(即不为导入的文件创建.beam文件)还是我理解错了?
(或者)
请解释在运行导入模块时获取导入文件的“.beam”文件的过程。
谢谢..
解决方案
推荐阅读
- java - 如何从嵌套的 for 循环中断到其最外层循环?
- html - HTML 和 CSS 填充所有 DIV
- python - Python Newspaper 函数在循环期间未读取文章 URL?
- powerbi - Power BI - 为仪表板嵌入链接,而不是报告
- spring-boot - Spring 反应式安全性
- node.js - Tensorflow JS 和 Electron Forge - 在 npm run make 后导入 tensorflow js 时出错
- python-3.x - 在 Python 3 中处理 BeautifulSoup4 时使用了太多内存
- powershell - 当 CVS 的任何一个字段在 powershell 中为空时,如何删除整行?
- gitlab - 如何手动触发Gitlab CI管道,在正常情况下,它是由带有提交ID的webhook触发的?
- node.js - 当我使用 findOne 方法来表达参数路由时,为什么我会得到 favicon.ico?