Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Compilation fails on Arduino 1.0 - fatal error: WProgram.h: No such file or directory #17

Closed
GoogleCodeExporter opened this issue May 28, 2015 · 17 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Start up Arduino dev GUI

2. In the GUI load the "LoLShield BasicTest" example:
File -> Examples -> LoLShield -> LoLShield_BasicTest

3. Press the compile button


What is the expected output? What do you see instead?

Expected: compilation works.
Instead:
libraries/LOLshield/Charliplexing.cpp:32:22: fatal error: WProgram.h: No such 
file or directory


What version of the product are you using? On what operating system?

- Latest Arduino GIT (git://github.com/arduino/Arduino.git), rev. 
11281ec77ece61aeab64d047ed899d47221dd4a7, 2012-01-05
- latest lolshield SVN, rev 19


Please provide any additional information below.

This is a known bug w/ lolshield code and Arduino 1.0 or newer. Seemingly 
Jimmie keeps fixing this every time he encounters the problem in one of his 
workshops so I thought patching the actual source in the repository would be 
more convenient ;)

I attached a patch file which sets things straight for Arduino 1.0 while still 
maintaining compatibility to older releases. 

This patch has been tested on ARDUINO 1.0 ONLY!

How to apply the patch:
- check out the lolshield SVN trunk
- put the patch file arduino-1.0-include.patch into the checkout directory
- run 
    patch -p0 --dry-run < arduino-1.0-include.patch

Original issue reported on code.google.com by thilo.al...@gmail.com on 5 Jan 2012 at 1:19

Attachments:

@GoogleCodeExporter
Copy link
Author

Could you please fix this annoying bug?

thank you

Original comment by akau...@gmail.com on 6 Jan 2012 at 4:12

@GoogleCodeExporter
Copy link
Author

ok I am totally new to this and thrown for a loop here can you explain patch 
application?  

downloaded LoLsheild program installed in arduino Library and it won't compile 
I can't find the svn trunk or the checkout directory and am not clear on the 
run instructions. 
trying to learn please help. 
thanks

Original comment by bradleyk...@gmail.com on 6 Jan 2012 at 4:36

@GoogleCodeExporter
Copy link
Author

I made a small mistake in the description: the patch line is of course

 patch -p0 < arduino-1.0-include.patch

(without the --dry-run)

I updated the description in the patch file as well. Patch newly attached.

Original comment by thilo.al...@gmail.com on 6 Jan 2012 at 4:39

Attachments:

@GoogleCodeExporter
Copy link
Author

Bradley, I'll try to help you and lead you through the process of patching 
sources. What OS do you use?

Original comment by thilo.al...@gmail.com on 6 Jan 2012 at 4:41

@GoogleCodeExporter
Copy link
Author

windows 7, and Thanks! I am re-installing arduino. I had it in the 64 bit 
program file, that may be one issue. In the arduino environment Jimmie makes a 
statement "this requires chairplexing library" so maybe I am missing the 
necessary files? I have also been using the v1 LoLsheild program, because I 
only get one error message the beta v2 gives like ten issues.  I do appreciate 
the help 

kip

Original comment by bradleyk...@gmail.com on 6 Jan 2012 at 5:06

@GoogleCodeExporter
Copy link
Author

Bradley, it looks like more of a general issue you're running into. That's OK, 
and I guess we'll be able to resolve it (although I'm using Linux, but this 
shouldn't be a problem).

Just since it's more of a general problem would you please come over to the 
google group (http://groups.google.com/group/lolshield) and open a new 
discussion there? It's just more visible this way in case someone else runs 
into the same problem.

When posting in the google group please specify:
- the Arduino Version you are using (1.0?, 0.22? 0.23?)
- the LoLShiled Version (I guess it's 0.1? I would recommend 0.2, though)
- the error messages (just copy+paste the whole compile output, like, 
*everything* from the status window, into your post)


Original comment by thilo.al...@gmail.com on 6 Jan 2012 at 5:52

@GoogleCodeExporter
Copy link
Author

Done! I hate that I am having a general problem.I was hoping not to have been 
stuck so fast. 
appreciatively, 

Original comment by bradleyk...@gmail.com on 6 Jan 2012 at 6:29

@GoogleCodeExporter
Copy link
Author

Really? Where? I can't find any post newer than 2010 here 
(http://groups.google.com/group/lolshield).

Original comment by thilo.al...@gmail.com on 6 Jan 2012 at 7:01

@GoogleCodeExporter
Copy link
Author

I posted again but ..............    New topic submitted to moderators of LoL 
Shield for review. Your post will appear in this group after it is approved by 
moderators.
Return to LoL Shield

Original comment by bradleyk...@gmail.com on 6 Jan 2012 at 7:20

@GoogleCodeExporter
Copy link
Author

C:/program files(x86)/arduino-1.0/libraries/LoLSheild/
Charliplexing.ccp:26:22:error: WPrograms.h: no such file or directory

I am using
windows 7
arduino 1.0
and have tried both LoL vo 0.1 and 0.2 but get a bunch of errors in
addtion to the one above with 0.2

I built the LoLSheild, downloaded arduino, and LoL program installed
it into the Library but receive error when trying to compile message
when I try to upload it to the Arduino uno smd version as well as
arduino uno.

thanks for any help

Original comment by bradleyk...@gmail.com on 6 Jan 2012 at 7:21

@GoogleCodeExporter
Copy link
Author

> " New topic submitted to moderators of LoL Shield for review. Your post will 
appear > in this group after it is approved by moderators. "

Ahh, okay :) I'm not a moderator, just an user like you, so I can''t see it.

> I am using
> windows 7
> arduino 1.0
> and have tried both LoL vo 0.1 and 0.2 but get a bunch of errors in
> addtion to the one above with 0.2

That looks OK to me.

> C:/program files(x86)/arduino-1.0/libraries/LoLSheild/
> Charliplexing.ccp:26:22:error: WPrograms.h: no such file or directory

That's good! I mean, well, obviously it's not perfect, but you're almost there.

You need to do the following: 
1. Open your favourite editor. The Arduino editor will not do since it won't 
let you open cpp files easily. Notepad will do in a pinch.

2. In your Editor, open and edit this file: 
   C:/program files(x86)/arduino-1.0/libraries/LoLShield/Figure.cpp

3. In line #25 (or so) of this file replace the line

#include "WProgram.h"

with

#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

4. Save and close the file. But we're not done editing files.

5. Now open C:/program 
files(x86)/arduino-1.0/libraries/LoLShield/Charlieplexing.cpp

6. In line #29 (or so) replace the line

#include "WProgram.h"

with

#if defined(ARDUINO) && ARDUINO >= 100
#include "Arduino.h"
#else
#include "WProgram.h"
#endif

7. Save and close the file. Only two more files to go! 

8. Now open 
  C:/program files(x86)/arduino-1.0/libraries/LoLShield/examples/LoLShield_FontTest/LoLShield_FontTest.pde

9. Same as above, the line #include "WProgram.h" should be around line #24 this 
time.

10. Save and close. We're almost at the finish line.

11. C:/program 
files(x86)/arduino-1.0/libraries/LoLShield//examples/LoLShield_Invader/LoLShield
_Invader.pde

12. Same thing again. At about line #26.

13. Save and close. Done and done!


Everything should build fine now. My patch (attached above) fixes this issue, 
so let's hope Jimmie will wake up at some point, include my patch, and create a 
release 0.3. I poked him via E-Mail, via Google+, and in this very issue 
tracker here. I might just fork the whole thing on GitHub if nobody of the 
committers here cares.

Original comment by thilo.al...@gmail.com on 6 Jan 2012 at 7:49

@GoogleCodeExporter
Copy link
Author

Awesome, I will work on it tonight. Any recommendations for skill building like 
"programming for dummies", or something. I have the "getting started with 
arduino" book.
 If I can get this down I'll do a led cube next. But, what if I want to go a bit further along with blinking lights/ El wire and such. 


Original comment by bradleyk...@gmail.com on 6 Jan 2012 at 8:11

@GoogleCodeExporter
Copy link
Author

I recommend looking at the LOLShield library examples, change a bit, see what 
it does. 

You may also try some hardware hacking and figure out how to connect a game 
controller to the analog ports to play the (Space) "Invaders" example.

If you're into PC programming you might also have fun writing a GUI application 
to set LEDs on the board: you could talk to the board via the USB connector 
(Serial.* set of functions on Arduino).

Whatever you do, always have the Reference handy 
(http://arduino.cc/en/Reference/HomePage). Also the Arduino Examples page 
(http://arduino.cc/en/Tutorial/HomePage) has almost-ready-to-use building 
blocks for more ambitious projects. For instance, there's a Serial I/O example 
which can help you building the Arduino firmware for that GUI controlled LED 
setter I dreamed up earlier.

Or maybe I gave you some ideas, but you're already thinking of something 
completely different - there sure is a lot of cool stuff you can do. Most 
imporantly, have fun with the LoLShield, and make sure to post your most 
impressive results on youtube!

Original comment by thilo.al...@gmail.com on 6 Jan 2012 at 8:51

@GoogleCodeExporter
Copy link
Author

Fixed in revision 20.

Original comment by thilo.al...@gmail.com on 7 Jan 2012 at 7:25

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Issue 14 has been merged into this issue.

Original comment by thilo.al...@gmail.com on 7 Jan 2012 at 7:49

@GoogleCodeExporter
Copy link
Author

ArduCopter.pde:68:24: fatal error: FastSerial.h: No such file or directory
compilation terminated.

Original comment by rohitz47...@gmail.com on 15 May 2015 at 3:06

@GoogleCodeExporter
Copy link
Author

Just installed LoL Shield SHD library, loaded Basic_Test and then ran into the 
following compilation error.
Does anyone have any pointers on what to do?

Arduino: 1.6.4 (Mac OS X), Board: "Arduino Uno"

In file included from Basic_Test.pde:31:0:
Basic_Test:49: error: variable 'BitMap' must be const in order to be put into 
read-only section by means of '__attribute__((progmem))'
variable 'BitMap' must be const in order to be put into read-only section by 
means of '__attribute__((progmem))'

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

Original comment by dr.peter...@gmail.com on 17 May 2015 at 9:55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant