16x2 lcd shield. 'error compiling for arduino genuino/uno'

Started by yorrite, February 01, 2020, 02:45:57 PM

Previous topic - Next topic


I've been trying to use a 16X2 lcd and buttons shield but cannot get the example program to load.

Error is 'error compiling for arduino genuino/uno'.

I have the library and examples installed, and am using IDE 1.8.9

Any help with getting me going would be much appreciated...


As far as I understand you have followed this document:


Is this correct?

What happens if you try to select different board from the board selection? Try one of the Olimex ones like OLIMEXINO-328.
Technical support and documentation manager at Olimex


You can try what LubOlimex suggested - try with one of the boards from Olimex package - Olimexino-328 or Olimexino-32U4.
If they are compiled then probably the issue is with the location of the library. When you select a board outside of the package (in your case arduino/genuino uno) all of libraries (from that package) are ignored - including the Shield-LCD-16x2. To make it work with other boards you must place the library folder into "Arduino\libraries" and run example from there.
May the Source be with You!


I don't have any Olimex boards, just Arduino.
The library and examples etc show up in the right folder, and on the Arduino IDE.
I am able to open the example file 'Buttons and LCD' for instance fine, but it refuses to compile for any boards on the list in tools.
Just tried compiling for Olimex boards as well but it still refuses...


That's strange.  ???
I tried to unistall the package in case it was somehow getting the library from it. So now I have no package and just placed the library folder into "Arduino\libraries" then I opened the example from: Main menu --> File --> Examples --> Olimex_Shield-LCD-16x2 --> <any example>" and they compile (with selected Arduino/Genuino Uno board).
I am using Arduino 1.8.10 but I doubt this will be the cause for the difference.

If you try another example (not from the Shield-LCD-16x2) do you get the same or similar error?
May the Source be with You!


Hi Stanimir,
Thanks for your reply.
I've just tried copying the 16X2 library folder into the Arduino directory and it makes no difference.
Examples for other shields work fine.
It's certainly something to do with the library but what can I be doing wrong?


Hey yorrite!

Unfortunately I can't replicate the problem you have so in the best case scenario I can only assume what it is and give some suggestions.

I have found this thread where someone had similar problem. Keep in mind it includes reinstall of the Arduino IDE so if you need to backup some librires or files do it before that.

Also here is a video with a different solution about it but I am afraid it won't help you since you can compile other projects.

If this doesn't help which is very likely since I still can't identify the problem - can you print here the whole error log.

Stan, Olimex
May the Source be with You!


Hi Stan and Lub,

Thank you for all your help and suggestions - I really appreciate your taking the time to try to sort out my little problem.

I am keen to get the shield working at some stage due to the economical use of pins. Sorry to say however that I've failed and put the shield on the shelf for the moment.

When I have someone round who is more competent than me perhaps we will be able to get it going between us...


I had faced this error sometimes back.I was able to fix my problem by doing the below steps:

also check this

At the beginning you need to close the Arduino IDE.

Then you need to go to the folder below:
For the Mac OS X user:


For the Windows user:

For Arduino IDE 1.6.5r5 and previous: C:\Users(username)\AppData\Roaming\Arduino15

For Arduino IDE 1.6.6 and later: C:\Users(username)\AppData\Local\Arduino15

And now delete your Arduino15 Folder.

Finally Reinstall your IDE.

Step 4 was not necessary for me but if you have messed up with the libs then you must do the clean install.