Robot-Will / Stino

A Sublime Text Plugin for Arduino
Other
1.58k stars 250 forks source link

At [Step 2] of build, I get "[Error] No main source file found." #418

Closed JasonCDN closed 7 years ago

JasonCDN commented 7 years ago

When I attempt to build with Stino, it gives me an error. Here is the output:

[Build] C:/Users/CDN/Documents/_Code/2017/04...
[Step 1] Check Toolchain.
[Step 2] Find all source files.
[Error] No main source file found. Main source file should be a c/c++ file, which contains main() function, or a Arduino file, which contains setup() and loop() functions.

The directory in fact does contain a source file, named "sketch.ino".

When I Ctrl + `, I don't see any error messages at all. The last message is from package control saying "upgrade skipped". No additional messages appear when I try to build.

I am using the default Stino from package control (just installed today - 04/07/2017). My sublime text is Build 3126. I am operating Windows 10 Home Edition. I do have the Arduino IDE installed, but I am using the avr 1.6.18 toolchain (Board: Arduino Genuino/Uno).

Hopefully someone can help me out here 😄

Robot-Will commented 7 years ago

Please show me the file "sketch.ino". Thanks.

JasonCDN commented 7 years ago

Here it is. I'm using a library I wrote recently (DriveControl). It compiles normally under the Arduino IDE. Surely that can't be the problem?

#include <DriveControl.h>

DriveControl driver(65, 1);

void setup() {
    driver.addInstruction(21, 21);
};

void loop() {
    driver.run();
};

Note: I am able to build the blink sketch with Stino.

Robot-Will commented 7 years ago

Remove ';' after '}', thanks.

#include <DriveControl.h>

DriveControl driver(65, 1);

void setup() {
    driver.addInstruction(21, 21);
}

void loop() {
    driver.run();
}