-
-
Notifications
You must be signed in to change notification settings - Fork 799
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
PIO build fails when esp8266/nodemcu2 board is used #646
Comments
@igrr do you have any ideas? |
Sure! Including STL headers from the same file which includes "Arduino.h" pretty much doesn't work.
Workaround: add |
Thanks @igrr and @ivankravets ! |
had to use
to get the compatible min and max ... |
Hi,
I've recently migrated my legacy IoT(https://github.com/supunj/libesp8266) project to PIO(https://github.com/supunj/libesp8266pio). All went well except for one which I believe
may be related to PIO pulling a different version of esp8266 SDK.
Below is the error I get
In file included from .pioenvs/nodemcuv2/ESP8266WiFi/WiFiClient.h:25:0,
from .pioenvs/nodemcuv2/ESP8266WiFi/ESP8266WiFi.h:39,
from .pioenvs/nodemcuv2/ESP8266mDNS/ESP8266mDNS.h:46,
from src/esp8266util.cpp:6:
/home/travis/.platformio/packages/toolchain-xtensa/xtensa-lx106-elf/include/c++/4.8.2/bits/stl_vector.h: In member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::_M_check_len(std::vector<_Tp, _Alloc>::size_type, const char*) const':
.pioenvs/nodemcuv2/FrameworkArduino/Arduino.h:254:18: error: expected unqualified-id before '(' token
You should be able to see the same in the travis CI log.
log.txt
This project runs on esp8266 nodemcu2.
When I dug little deeper I figured that Arduino.h had something it didnt have in the legacy SDK.
//#ifndef _GLIBCXX_VECTOR
// arduino is not compatible with std::vector
//#define min(a,b) ((a)<(b)?(a):(b))
//#define max(a,b) ((a)>(b)?(a):(b))
//#endif
Once I commented out the above lines, it worked fine.
I'm not sure if I'm doing something wrong but I do use std::vector in the project.
Let me know if you need further details.
The text was updated successfully, but these errors were encountered: