While compiling R107, this is what I get:
Arduino: 1.6.8 (Windows Vista), Board:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Serial, 115200, 4M (3M SPIFFS)"
C:\Users\Bert\AppData\Local\Temp\arduino_modified_sketch_327360\ESPEasy.ino: In function 'int __get_adc_mode()':
ESPEasy:224: error: previous declaration of 'int __get_adc_mode()' with 'C++' linkage
ADC_MODE(ADC_VCC);
^
In file included from C:\Tools\Arduino 1.6.8\arduino-1.6.8\portable\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266/Arduino.h:247:0,
from sketch\ESPEasy.ino.cpp:1:
C:\Tools\Arduino 1.6.8\arduino-1.6.8\portable\packages\esp8266\hardware\esp8266\2.1.0\cores\esp8266/Esp.h:74:58: error: conflicts with new declaration with 'C' linkage
#define ADC_MODE(mode) extern "C" int __get_adc_mode(void) { return (int) (mode); }
^
C:\Users\Bert\AppData\Local\Temp\arduino_modified_sketch_327360\__Plugin.ino:224:1: note: in expansion of macro 'ADC_MODE'
#endif
^
exit status 1
previous declaration of 'int __get_adc_mode()' with 'C++' linkage
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Another compiling error
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 25
- Joined: 29 Apr 2016, 06:54
Re: Another compiling error
Use version 1.6.5 of the IDE.
Re: Another compiling error
That is New to me. I Always use 1.6.8.
But it seems to work.
But it seems to work.
-
- Normal user
- Posts: 103
- Joined: 16 Sep 2015, 20:32
Re: Another compiling error
It's a bug in 1.6.8
In the nightly builds it is resolved.
Or you can set the #define FEATURE_ADC_VCC to false
Then it builds correct with 1.6.8
In the nightly builds it is resolved.
https://github.com/esp8266/Arduino/issues/1759This seems to be caused by arduino-builder not generating correct forward declarations for functions marked with extern C.
I'll see if we can implement a workaround for this, since the just-released arduino 1.6.8 is affected by this issue.
Or you can set the #define FEATURE_ADC_VCC to false
Then it builds correct with 1.6.8
Re: Another compiling error
The workaround from https://github.com/esp8266/Arduino/issues/1759 (by tamptus 26.Apr) works for me with 1.6.8 when I replace the call to ADC_MODE(ADC_VCC) with #include "adc.h" (see qutation below)
Add a new Tab with file adc.h
with one line:
ADC_MODE(ADC_VCC)
add
#include "adc.h"
as first include in first tab.
Who is online
Users browsing this forum: Bing [Bot] and 13 guests