Why can't I use custom name for library example code?

Hi. It was a while from last time I fired up my core. So maybe I missing something, if yes then excuse me.

I have 20x4 lcd (qc2004a). So decided to give a shoot and make some kind thermometer. Looks easy, but… run in some problems:
PROBLEMS. First here is bug/mistake in library LiquidCristal example code. In spark-hellosparky.ino line 40 should be #include "LiquidCrystal/LiquidCrystal.h" instead of #include "LiquidCrystal.h". Well if I do this “fix” example code verifies and runs for me.
BUT if I create new app named LCD_20X4_TEST and copy paste working example code it gives error:

In file included from ../inc/spark_wiring.h:29:0,
from ../inc/application.h:29,
from lcd_20x4_test.cpp:1:
../../core-common-lib/SPARK_Firmware_Driver/inc/config.h:12:2: warning: #warning "Defaulting to Release Build" [-Wcpp]
#warning "Defaulting to Release Build"
^
lcd_20x4_test.cpp:40:41: fatal error: LiquidCrystal/LiquidCristal.h: No such file or directory
This example code is in the public domain.
^
compilation terminated.
make: *** [lcd_20x4_test.o] Error 1

So could someone explain what I do wrong.
Tnx in advance.

@Xloras, did you attach the LiquidCrystal library to your new app? :smile:

1 Like

It’s working now.
Problem was: I thought by writing #include "LiquidCrystal/LiquidCrystal.h" Includes library from spark, but it doesn’t. I deleted all #include's an then attached (clicked on ‘include to app’) and its now working.
Now I have question. Code looks the same (using web ide) but why it do not included library by writing #include? My guess difference would be if I download code. One would have library another don’t. So I guess when I use webIDE it creates some kind space for my code and then click include library its add to that space, even if code looks the same. I’m I thinking right way in here?

BTW thank you for replay peekay123

1 Like