Build Failed ESP8266

#1

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

0 Likes

#2

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.

0 Likes

#3

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.

0 Likes

#4

Post the build log, please.

0 Likes

#5

This is the log builed failed.
Log Build

0 Likes

#6

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

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

0 Likes

#7

Ok… :laughing::laughing:

0 Likes

#8

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
0 Likes