Build Failed ESP8266

I’m new in Mongoose OS. I have a project making running text using LED Matrix MAX7219 in Mongoose OS.

I trying to build with these libraries:

  1. https://github.com/mongoose-os-libs/arduino-md-parola
  2. https://github.com/mongoose-os-libs/spi
  3. https://github.com/mongoose-os-libs/md-max72xx

But I keep getting failed build.

Could anyone help? How to fix this?

This is the log when the build failed.
Log Build

arduino-md-parola and md-max72xx are C++ and you are trying to use them in a C project.

Rename main.c into main.cpp and add extern "C" before mgos_app_init

extern "C" enum mgos_app_init_result mgos_app_init(void) {
  // initialization code

  return MGOS_APP_INIT_SUCCESS;
}

Rebuild with --clean flag.

Ok. Thanks for that. I tried it, but it’s still keep getting build failed.

This is the main.cpp code:

#include “mgos.h”

extern “C” enum mgos_app_init_result mgos_app_init(void) {

return MGOS_APP_INIT_SUCCESS;
}

This is for testing the build.

Post the build log, please.

This is the log builed failed.
Log Build

It looks like you are the first user of this library :smile:

I’ll try to fix the build errors for you.

Ok… :laughing::laughing:

For the moment, modify mos.yml like this:

  - origin: https://github.com/nliviu/md-max72xx
    version: master
  - origin: https://github.com/nliviu/arduino-md-parola
    version: master