简体   繁体   English

IntelliJ Erlang“未解析的宏”

[英]IntelliJ Erlang "Unresolved macros"

Setup:设置:

IntelliJ IDEA 2022.2.2
Erlang plugin 0.11.1144
SDK: Erlang OTP 25, erts-13.0
Project Imported: https://github.com/FlowForwarding/enetconf

Issue: When I mouse over some macros, I get the message "Unresolved macros '?debugMsg'", "Unresolved macros '?assertEqual'", etc. As a result, I am unable to do a code walk-through.问题:当我将鼠标悬停在某些宏上时,我收到消息“Unresolved macros '?debugMsg'”、“Unresolved macros '?assertEqual'”等。因此,我无法执行代码演练。 Please help me in resolving the issue.请帮我解决这个问题。

Initial Debug: I see corresponding hrl files are included as listed below.初始调试:我看到相应的 hrl 文件如下所列。 But, when I mouseover the following line, I get a message "Unresolved include_lib: file not found".但是,当我将鼠标悬停在以下行上时,我收到一条消息“未解决的 include_lib:找不到文件”。 Looks like the hrl files are not included properly.看起来 hrl 文件没有正确包含。

-include_lib("eunit/include/eunit.hrl").
-include_lib("xmerl/include/xmerl.hrl").

在此处输入图像描述

在此处输入图像描述

The issue got resolved after configuring Content roots as explained in https://www.jetbrains.com/help/idea/content-roots.html .按照https://www.jetbrains.com/help/idea/content-roots.html中的说明配置内容根后问题得到解决。 The ContentRoot looked as follows. ContentRoot 如下所示。

内容根

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM