Chat here about code rewrites, mods, etc... with respect to the github project https://github.com/esp8266/Arduino

Moderator: igrr

User avatar
By lsk123
#56169 Thanks martinayotte. I finally figured it out: the slober (eclipseArduino 3.1) plugin generates a file .ino.cpp every time a project is built. That's where the declaration needs to change.

I also had to disable wdt in the run loop, otherwise it was resetting the board.
I had no such problem with Arduino IDE.

Hope it helps whoever is going through the same pain.
User avatar
By Xoyce
#60841 Sorry, but I did not understand what the final solution was with this problem? I am having basically the same issue here:

Code: Select allextern "C" {
#include "user_interface.h"
}

void setup() {
   Serial.begin(115200);
}

void loop() {

   Serial.print("system_get_sdk_version(): ");
   Serial.println(system_get_sdk_version());

   delay(1000);
}



at compile time I get:
Code: Select all.ino:9: undefined reference to `system_get_sdk_version()'


EDIT:
I figured. You can avoid this error by creating another header file and puting extern "C" in there.
Code: Select allextern "C" {
#include "user_interface.h"
}