-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error occurs in the header file when compiling. #357
Comments
Most of the issues seem to have been resolved by changing the include order of the header file. However, the content below appears to be a different problem. Is there any solution? In file included from c:\Users\kimwoo0.KOMECO\Documents\Arduino\libraries\modbus-esp8266\src/ModbusEthernet.h:12, exit status 1 Compilation error: exit status 1 |
The error you're encountering is due to the compiler being unable to find the definition for the types Callback or cbModbusConnect. This is typically caused by incorrect order of including header files or missing definitions. Here is a step-by-step approach to resolve this issue:
|
What I did was install Arduino IDE 2.3.2 and installed the esp8266 by ESP8266 Communuty package.
Then I installed the library and loaded the example file and compiled it, but the following error occurred.
AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.1.2/tools/sdk/lwip2/include/lwip/ip4_addr.h:63: warning: "IPADDR_NONE" redefined
modbus-esp8266\src/ModbusTCPTemplate.h:15: note: this is the location of the previous definition
15 | #define IPADDR_NONE ((uint32_t)0xffffffffUL)
modbus-esp8266\src/ModbusTCPTemplate.h:17:1: error: 'Callback' does not name a type; did you mean 'TCallback'?
modbus-esp8266\src/ModbusTCPTemplate.h:20:23: error: 'IPAddress' was not declared in this scope; did you mean 'TAddress'?
I've encountered many similar types of errors.
What's wrong?
The text was updated successfully, but these errors were encountered: