r1561 breaks compilation in Arduino IDE

Post Reply
dominicclifton
Posts: 202
Joined: Tue Feb 05, 2013 10:28 pm

r1561 breaks compilation in Arduino IDE

Post by dominicclifton »

r1561
- exactly one definition of VERSION + welcome message for arduino IDE users

This breaks compilation in Arduino IDE (1.0.5).

Anything that tries to

#include "MultiWii.ino"

fails with "No such file or directory MultiWii.ino" or similar.

My solution was this:

Code: Select all

From f47bff431393911f52b7ee1e27a50b3fc6324d16 Mon Sep 17 00:00:00 2001
From: Dominic Clifton <me@dominicclifton.name>
Date: Mon, 2 Sep 2013 22:14:59 +0100
Subject: [PATCH] Fix Arduino IDE build problem.

---
 MultiWii.h   |    2 +-
 MultiWii.ino |    2 --
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/MultiWii.h b/MultiWii.h
index 0612147..52c0bdc 100644
--- a/MultiWii.h
+++ b/MultiWii.h
@@ -1,7 +1,7 @@
 #ifndef MULTIWII_H_
 #define MULTIWII_H_
 
-#include "MultiWii.ino" // to get the VERSION
+#define  VERSION  221
 
 #include "types.h"
 
diff --git a/MultiWii.ino b/MultiWii.ino
index 712779a..6f9892f 100644
--- a/MultiWii.ino
+++ b/MultiWii.ino
@@ -1,5 +1,3 @@
-#define  VERSION  221
-
 /*
  * Welcome to MultiWii.
  *
--
1.7.5.1


User avatar
Hamburger
Posts: 2559
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: r1561 breaks compilation in Arduino IDE

Post by Hamburger »

Ok. Damn, ide compilation is even more stupid than my makefile based lookalike build scheme.
I can only fix it in shared over the weekend, sorry.

doughboy
Posts: 252
Joined: Tue Sep 04, 2012 7:20 am

r1561 breaks compilation in Arduino IDE

Post by doughboy »

Ok, I thought it was just me unable to compile using arduino IDE. Anyway, I ended up setting up eclipse only to find more problems there. Moving to eclipse may be well and good, but that will not eliminate problems like people checking in without testing. Eclipse can certainly help in program quality but ultimately, it is the programmer that creates the quality code, not the tool.

User avatar
Hamburger
Posts: 2559
Joined: Tue Mar 01, 2011 2:14 pm
Location: air
Contact:

Re: r1561 breaks compilation in Arduino IDE

Post by Hamburger »

r1563

Post Reply