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

Error compiling sketch that works in Arduino IDE #659

Closed
hazarkarabay opened this Issue May 14, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@hazarkarabay

hazarkarabay commented May 14, 2016

Configuration

Operating system: Windows 7 x64

PlatformIO Version (platformio --version): 2.9.1

Description of problem

This sketch compiles fine in Arduino IDE 1.6.9 with https://github.com/esp8266/Arduino

Actual Results

(penv) r:\test>pio run
[05/13/16 20:26:00] Processing d1_mini (platform: espressif, board: d1_mini, framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------
xtensa-lx106-elf-ar rcs .pioenvs\d1_mini\libFrameworkArduinoVariant.a
xtensa-lx106-elf-g++ -o .pioenvs\d1_mini\src\tmp_ino_to.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions=4 -f
function-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_NODEMCU -DARDUINO=20200 -DP
LATFORMIO=020901 -U__STRICT_ANSI__ -IC:\users\hazar\.platformio\packages\framework-arduinoespressif\tools\sdk\include -IC:\users\hazar\.platformio\packages\fram
ework-arduinoespressif\tools\sdk\lwip\include -I.pioenvs\d1_mini\FrameworkArduino -I.pioenvs\d1_mini\FrameworkArduinoVariant -I.pioenvs\d1_mini\ESP8266WiFi -I.p
ioenvs\d1_mini\ESP8266mDNS -I.pioenvs\d1_mini\ArduinoOTA -I.pioenvs\d1_mini\Hash -I.pioenvs\d1_mini\ESPAsyncTCP_ID305 -I.pioenvs\d1_mini\ESPAsyncWebServer_ID306
 src\tmp_ino_to.cpp
xtensa-lx106-elf-g++ -o .pioenvs\d1_mini\FrameworkArduino\Esp.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-function
s=4 -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_NODEMCU -DARDUINO=202
00 -U__STRICT_ANSI__ -IC:\users\hazar\.platformio\packages\framework-arduinoespressif\tools\sdk\include -IC:\users\hazar\.platformio\packages\framework-arduinoe
spressif\tools\sdk\lwip\include -I.pioenvs\d1_mini\FrameworkArduino -I.pioenvs\d1_mini\FrameworkArduinoVariant .pioenvs\d1_mini\FrameworkArduino\Esp.cpp
xtensa-lx106-elf-g++ -o .pioenvs\d1_mini\FrameworkArduino\FS.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functions
=4 -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_NODEMCU -DARDUINO=2020
0 -U__STRICT_ANSI__ -IC:\users\hazar\.platformio\packages\framework-arduinoespressif\tools\sdk\include -IC:\users\hazar\.platformio\packages\framework-arduinoes
pressif\tools\sdk\lwip\include -I.pioenvs\d1_mini\FrameworkArduino -I.pioenvs\d1_mini\FrameworkArduinoVariant .pioenvs\d1_mini\FrameworkArduino\FS.cpp
xtensa-lx106-elf-g++ -o .pioenvs\d1_mini\FrameworkArduino\HardwareSerial.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -fali
gn-functions=4 -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_NODEMCU -D
ARDUINO=20200 -U__STRICT_ANSI__ -IC:\users\hazar\.platformio\packages\framework-arduinoespressif\tools\sdk\include -IC:\users\hazar\.platformio\packages\framewo
rk-arduinoespressif\tools\sdk\lwip\include -I.pioenvs\d1_mini\FrameworkArduino -I.pioenvs\d1_mini\FrameworkArduinoVariant .pioenvs\d1_mini\FrameworkArduino\Hard
wareSerial.cpp
xtensa-lx106-elf-g++ -o .pioenvs\d1_mini\FrameworkArduino\IPAddress.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-fu
nctions=4 -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_NODEMCU -DARDUI
NO=20200 -U__STRICT_ANSI__ -IC:\users\hazar\.platformio\packages\framework-arduinoespressif\tools\sdk\include -IC:\users\hazar\.platformio\packages\framework-ar
duinoespressif\tools\sdk\lwip\include -I.pioenvs\d1_mini\FrameworkArduino -I.pioenvs\d1_mini\FrameworkArduinoVariant .pioenvs\d1_mini\FrameworkArduino\IPAddress
.cpp
xtensa-lx106-elf-g++ -o .pioenvs\d1_mini\FrameworkArduino\MD5Builder.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-f
unctions=4 -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_NODEMCU -DARDU
INO=20200 -U__STRICT_ANSI__ -IC:\users\hazar\.platformio\packages\framework-arduinoespressif\tools\sdk\include -IC:\users\hazar\.platformio\packages\framework-a
rduinoespressif\tools\sdk\lwip\include -I.pioenvs\d1_mini\FrameworkArduino -I.pioenvs\d1_mini\FrameworkArduinoVariant .pioenvs\d1_mini\FrameworkArduino\MD5Build
er.cpp
xtensa-lx106-elf-g++ -o .pioenvs\d1_mini\FrameworkArduino\Print.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functi
ons=4 -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_NODEMCU -DARDUINO=2
0200 -U__STRICT_ANSI__ -IC:\users\hazar\.platformio\packages\framework-arduinoespressif\tools\sdk\include -IC:\users\hazar\.platformio\packages\framework-arduin
oespressif\tools\sdk\lwip\include -I.pioenvs\d1_mini\FrameworkArduino -I.pioenvs\d1_mini\FrameworkArduinoVariant .pioenvs\d1_mini\FrameworkArduino\Print.cpp
xtensa-lx106-elf-g++ -o .pioenvs\d1_mini\FrameworkArduino\Stream.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-funct
ions=4 -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_NODEMCU -DARDUINO=
20200 -U__STRICT_ANSI__ -IC:\users\hazar\.platformio\packages\framework-arduinoespressif\tools\sdk\include -IC:\users\hazar\.platformio\packages\framework-ardui
noespressif\tools\sdk\lwip\include -I.pioenvs\d1_mini\FrameworkArduino -I.pioenvs\d1_mini\FrameworkArduinoVariant .pioenvs\d1_mini\FrameworkArduino\Stream.cpp
xtensa-lx106-elf-g++ -o .pioenvs\d1_mini\FrameworkArduino\StreamString.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign
-functions=4 -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_NODEMCU -DAR
DUINO=20200 -U__STRICT_ANSI__ -IC:\users\hazar\.platformio\packages\framework-arduinoespressif\tools\sdk\include -IC:\users\hazar\.platformio\packages\framework
-arduinoespressif\tools\sdk\lwip\include -I.pioenvs\d1_mini\FrameworkArduino -I.pioenvs\d1_mini\FrameworkArduinoVariant .pioenvs\d1_mini\FrameworkArduino\Stream
String.cpp
R:/test/src/ESP_AsyncFSBrowser.ino:18:6: error: 'bool SPIFFSEditor::canHandle(AsyncWebServerRequest*)' cannot be overloaded
if(request->method() == HTTP_GET && request->url() == "/edit" && (SPIFFS.exists("/edit.htm") || SPIFFS.exists("/edit.htm.gz")))
^
R:/test/src/ESP_AsyncFSBrowser.ino:17:10: error: with 'bool SPIFFSEditor::canHandle(AsyncWebServerRequest*)'
bool canHandle(AsyncWebServerRequest *request){
^
R:/test/src/ESP_AsyncFSBrowser.ino:34:10: error: 'void SPIFFSEditor::handleRequest(AsyncWebServerRequest*)' cannot be overloaded
if(_username.length() && (request->method() != HTTP_GET || request->url() == "/edit" || request->url() == "/list") && !request->authenticate(_username.c_str(),_
password.c_str()))
^
R:/test/src/ESP_AsyncFSBrowser.ino:19:10: error: with 'void SPIFFSEditor::handleRequest(AsyncWebServerRequest*)'
return true;
^
R:/test/src/ESP_AsyncFSBrowser.ino:99:10: error: 'void SPIFFSEditor::handleUpload(AsyncWebServerRequest*, String, size_t, uint8_t*, size_t, bool)' cannot be ove
rloaded
if(!index){
^
R:/test/src/ESP_AsyncFSBrowser.ino:21:10: error: with 'void SPIFFSEditor::handleUpload(AsyncWebServerRequest*, String, size_t, uint8_t*, size_t, bool)'
return true;
^
scons: *** [.pioenvs\d1_mini\src\tmp_ino_to.o] Error 1
xtensa-lx106-elf-g++ -o .pioenvs\d1_mini\FrameworkArduino\Tone.o -c -fno-rtti -fno-exceptions -std=c++11 -Os -mlongcalls -mtext-section-literals -falign-functio
ns=4 -ffunction-sections -fdata-sections -MMD -DF_CPU=80000000L -D__ets__ -DICACHE_FLASH -DESP8266 -DARDUINO_ARCH_ESP8266 -DARDUINO_ESP8266_NODEMCU -DARDUINO=20
200 -U__STRICT_ANSI__ -IC:\users\hazar\.platformio\packages\framework-arduinoespressif\tools\sdk\include -IC:\users\hazar\.platformio\packages\framework-arduino
espressif\tools\sdk\lwip\include -I.pioenvs\d1_mini\FrameworkArduino -I.pioenvs\d1_mini\FrameworkArduinoVariant .pioenvs\d1_mini\FrameworkArduino\Tone.cpp
================================================================= [ ERROR ] Took 1.71 seconds =================================================================

Expected Results

Sketch compiles successfully.
Full compile log from Arduino IDE can be found at http://pastebin.com/8Eh7Tciq

The content of platformio.ini:

platform = espressif
framework = arduino
board = d1_mini

Source file to reproduce issue:
https://github.com/me-no-dev/ESPAsyncWebServer/blob/master/examples/ESP_AsyncFSBrowser/ESP_AsyncFSBrowser.ino

@ivankravets ivankravets assigned ivankravets and unassigned valeros Jun 16, 2016

@ivankravets ivankravets added this to the 2.10.4 milestone Jun 16, 2016

@ivankravets ivankravets removed this from the 2.10.4 milestone Jun 19, 2016

@ivankravets

This comment has been minimized.

Member

ivankravets commented Jun 19, 2016

Temporary solution is to rename file from ino to cpp.

@ivankravets

This comment has been minimized.

ivankravets added a commit that referenced this issue Sep 9, 2016

Merge branch 'develop' into feature/unicode-issue-771
* develop:
  Fix incorrect line order when converting from INO to CPP and pointer is used
  Fix unit test
  Notify about `version` field when creating library
  Add support for SparkFun Blynk Board
  Return valid exit code from ``plaformio test`` command
  Disable SSL Server-Name-Indication for Python < 2.7.9
  Version bump to 3.0.1 (issue #772)
  Disable temporary SSL for PlatformIO services // Resolve #772
  Version bump to 3.0.0 (issues #770, #766, #747, #730, #765, #640, #659, #742, #459, #542, #763, #759, #753, #757, #749, #748, #745, #519, #709, #743, #413, #498, #410, #740, #361, #414, #554, #732, #588, #475, #461, #101, #719, #721, #537, #415, #522, #289, #556, #570, #456, #617, #432, #408, #479, #667, #510)
  Fix menu height for  docs
  Fix issue with multiple archives when linking firmware
  Add migration guide for PIO2 to PIO3
  Search libraries by headers/includes with ``platformio lib search --header`` option
  Update pio run command examples
  Add Unit Testing Demo
  Update PIO Plus badge title and link
  Add PlatformIO Plus badge
  Add links to PlatformIO Plus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment