tenbaht / sduino

An Arduino-like programming API for the STM8
http://tenbaht.github.io/sduino/
GNU Lesser General Public License v2.1
351 stars 217 forks source link

Compilation error when including .c file from the same directory #142

Open dvhx opened 2 years ago

dvhx commented 2 years ago

I have 3 files in project folder:

Content of lib.h:

#define FOO 123

Content of lib.c:

#include "lib.h"
int foo() {
  return FOO;
}

Content of project.ino:

#include "lib.c"
void setup() {
  // put your setup code here, to run once:
}
void loop() {
  // put your main code here, to run repeatedly:
}

When I try to compile it it ends with error: panic: runtime error: index out of range [2] with length 2