Old program, newer PC, problems with some libraries

I have a problem with getting my oled TFT µLCD-144(GFX) (uLCD144-G1) going.

With the published libs, Arduino keeps asking for some WProgramm.h which I cant connect with the program, then there are other issues with SoftwareSerial.h, anyway, I tried to compile an old sketch, for a battery charger, that I had built years ago. Fortunately I had the entire project saved on CD. I have the sketch, all the libs, but it doesnt compile.
It finds the libs, but with two of them there seems to be a problem: Timer1.h, and uLCD_144.h.

There seems to be a problem with the functions in those libraries. The functions are there, and did work befor.
All thats different, now its W10 on a newer PC.

This are only a few lines of the error message:

C:\Users\legacy\AppData\Local\Temp\build3152014515114606115.tmp/charger_2011_07_21_V06.cpp:597: undefined reference to `uLCD_144::clrScreen()'

C:\Users\legacy\AppData\Local\Temp\build3152014515114606115.tmp/charger_2011_07_21_V06.cpp:643: undefined reference to `Timer1'

C:\Users\legacy\AppData\Local\Temp\build3152014515114606115.tmp/sketch_mar14a.cpp:388: undefined reference to `uLCD_144::printStr(int, int, int, unsigned char, unsigned char, unsigned char, char const*)'

Can anybody help me with my problem ? really I need to get the uLCD going, but to be able to use my old program would be nice too.

Truely, John

Best option is to find updated libraries. If they don't exist, replace WProgram.h by Arduino.h in each file that the compiler complains about.

You must have an ancient install on your old computer.

You must have an ancient install on your old computer.

Arduino 0023, and that´s what I use from the CD, I have everything saved on a CD. The whole original setup. And doesn`work.

OK, I only answered for the WProgram.h.

I'm a little confused. Are you saying that you're still using 0023? And run it from a CD? Or are you now using 1.8.x? The WProgram.h issue seems to indicate that you're no longer using 0023.

The 'undefined reference' errors seem to indicate that your libraries are not installed correctly. The compiler can find the library include files but it did probably not compile the library source files.

Which libraries are you including? Please provide links.

The usual location for 3rd party libraries is C:\Users\YourUserName\Documents\Arduino\libraries. Is your library in there?

Can you post an example sketch that shows the behaviour (or you charger code that does not compile)?

Please enable 'show verbose output during compilation' and set 'compiler warnings' to all in preferences. Copy the complete content of the output window and post here (attach as text file if it's too big).

Thank you for your help.

I’m a little confused. Are you saying that you’re still using 0023? And run it from a CD? Or are you now using 1.8.x? The WProgram.h issue seems to indicate that you’re no longer using 0023.[/quote]

At first I tried to use everything from the CD, there I used 0023 Arduino. There I got those error messages. I already found out, youre right, the cpp. filesw from timer1 and uLCD144 were missing. I replaced those, bit still following error:
C:\Users\legacy\Documents\Arduino\libraries\header\uLCD_144.cpp: In constructor ‘uLCD_144::uLCD_144(int)’:

and many more like this.

Can it be, that I would need Wprogram.h and is there a Wprogram.cpp also? That I dont have on my CD copy.

The other error, was when I tried to simply get the uLCD144 going, in the sample program from uLCD is a function SoftwareSerial, there was the error Wprogram missing. This was with Arduino version 1.6.9

I also included <Arduino.h> where it was WProgram.h in the header of uLCD144 and in an other header file where first WProgram.h was incuded. On Arduino 1.6.9
Still that error "BYTE not declared in uLCD library.

uLCD_144.cpp (3.82 KB)

uLCD_144.h (1.13 KB)


Change in uLCD_144.h the include

#include <Arduino.h>
//#include "WProgram.h"

That will get rid of the WProgram.h error

Add the following to uLCD_144.cpp

#include "uLCD_144.h"
// new; 0023 compatibility
#define BYTE HEX


The dots indicate the remainder of the code.

I have tried to find what BYTE exactly was supposed to mean; this assumes that BYTE nowadays is called HEX and the #define just defines it with the correct ‘value’. So everywhere where the compile process sees BYTE, it will be replaced by HEX.

You can compile your code, upload and test it. If it does not work, there is a chance that BYTE actually meant BIN and you can adjust the #define accordingly to try.

OK, forget about the BYTE modification as shown. I found a library here that seems to have been updated for newer versions of the Arduino IDE.

Looking at it, BYTE does not work as I thought.