Skip to content

When Calling the Airkiss Function,print "undefined reference to" #3592

Closed
@hangzxh

Description

@hangzxh

Basic Infos

How to call airkiss function? for example "airkiss_version".When compiled, Arduino IDE print"undefined reference to `airkiss_version'
Hardware
Hardware: ESP-12E
Core Version: 2.3.0

Description

How to call airkiss function? for example "airkiss_version".When compiled, Arduino IDE print"undefined reference to `airkiss_version'.
I have found the airkiss.h in "Arduino\hardware\espressif\esp8266\tools\sdk\include"
also the libairkiss.a in "Arduino\hardware\espressif\esp8266\tools\sdk\lib"

Settings in IDE

Sketch

/*

  • NativeSdk by Simon Peter
  • Access functionality from the Espressif ESP8266 SDK
  • This example code is in the public domain
  • This is for advanced users.
  • Note that this makes your code dependent on the ESP8266, which is generally
  • a bad idea. So you should try to use esp8266/Arduino functionality
  • where possible instead, in order to abstract away the hardware dependency.
    */

// Expose Espressif SDK functionality - wrapped in ifdef so that it still
// compiles on other platforms
#ifdef ESP8266
extern "C" {
#include "user_interface.h"
#include "airkiss.h"
}

#endif

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

void loop() {
// Call Espressif SDK functionality - wrapped in ifdef so that it still
// compiles on other platforms
#ifdef ESP8266
Serial.print("wifi_station_get_hostname: ");
Serial.println(wifi_station_get_hostname());
Serial.println(airkiss_version());
#endif
delay(1000);
}

Debug Messages

Archiving built core (caching) in: \AppData\Local\Temp\arduino_cache_581525\core\core_espressif_esp8266_nodemcuv2_CpuFrequency_160,UploadSpeed_115200,FlashSize_4M1M_9e863c8058aaa52e06769f0454a69ae4.a
sketch\CallSDKFunctions.ino.cpp.o: In function `setup':

\Documents\Arduino\CallSDKFunctions/CallSDKFunctions.ino:25: undefined reference to `airkiss_version'

sketch\CallSDKFunctions.ino.cpp.o: In function `loop':

\Documents\Arduino\CallSDKFunctions/CallSDKFunctions.ino:31: undefined reference to `airkiss_version'

collect2.exe: error: ld returned 1 exit status

exit status 1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions