Go Down

Topic: Using Multiple Libraries At Same Time (Read 187 times) previous topic - next topic

Ahmet_Duzenli

Jul 14, 2018, 05:05 pm Last Edit: Jul 14, 2018, 05:06 pm by Ahmet_Duzenli
I want to use LCD5110_Basic and LCD5110_Graph libraries at same time but I can't because IDE gives that error:
exit status 1
error compiling for board arduino/genuino uno

I searched however I can't find any solution for these libraries. Does this problem incur due to these libraries collide with one another?

pert

When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here USING CODE TAGS (</> button on the toolbar).

Ahmet_Duzenli

#2
Jul 14, 2018, 05:17 pm Last Edit: Jul 14, 2018, 05:18 pm by Ahmet_Duzenli
Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"

<In file included from C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:4:0:

C:\Program Files\Arduino\libraries\LCD5110_Graph/LCD5110_Graph.h:69:8: error: redefinition of 'struct _current_font'

 struct _current_font

        ^

In file included from C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:3:0:

C:\Program Files\Arduino\libraries\LCD5110_Basic/LCD5110_Basic.h:69:8: error: previous definition of 'struct _current_font'

 struct _current_font

        ^

In file included from C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:4:0:

C:\Program Files\Arduino\libraries\LCD5110_Graph/LCD5110_Graph.h:79:7: error: redefinition of 'class LCD5110'

 class LCD5110

       ^

In file included from C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:3:0:

C:\Program Files\Arduino\libraries\LCD5110_Basic/LCD5110_Basic.h:79:7: error: previous definition of 'class LCD5110'

 class LCD5110

       ^

C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino: In function 'void loop()':

C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:44:31: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   myGLCD.print("Uzaklik: ",0,7);

                               ^

C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:46:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   myGLCD.print("(cm)",0,15);

                           ^

C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:52:32: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   myGLCD.print("Sicaklik:",0,25);

                                ^

C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:56:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   myGLCD.print("(C)",15,35);

                           ^

C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:61:31: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   myGLCD.print("Uzaklik: ",0,7);

                               ^

C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:63:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   myGLCD.print("(cm)",0,15);

                           ^

C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:67:31: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   myGLCD.print("Nem (%):",0,25);

                               ^

C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:76:31: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   myGLCD.print("Uzaklik: ",0,7);

                               ^

C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:78:27: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   myGLCD.print("(cm)",0,15);

                           ^

C:\Users\Ahmet\Documents\Arduino\sketch_jul11c\sketch_jul11c.ino:84:32: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

   myGLCD.print("Sicaklik:",0,25);

                                ^

exit status 1
Error compiling for board Arduino/Genuino Uno.>

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

Also I can use libraries individually.

wvmarle

Yes, the libraries clash.

Is there anything in the "basic" library you need that's not part of the "graph" library?
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Ahmet_Duzenli

#4
Jul 14, 2018, 08:33 pm Last Edit: Jul 14, 2018, 09:07 pm by Ahmet_Duzenli
No,there isn't. Because Graph library is extended form of Basic library, it has already whole functions that is in Basic. But it's not working with static prints.For example, You want to print humidity with Basic:

Humidity : % 50

It prints  but I want to slide this. Graph library doesn't do that (Actually it does). Whereas Graph prints the sensor values , but it doesn't print the strings. I have to use Basic but when I use them same time they collide with themselves

PaulS

Your last post doesn't make sense. Either the graph library includes all the functionality of the basic library (which you said it does) or it doesn't and trying to use basic functions in the graph library causes errors.

Which is it?

Quote
It prints  but I want to slide this.
I have no idea what that means.

Quote
Graph library doesn't do that (Actually it does).
Does it or doesn't it? You can't be a little bit pregnant.

Quote
Whereas Graph prints the sensor values , but it doesn't print the strings.
If it can convert a value to a string and print the string, it seems highly unlikely that it can't print a string.

Quote
I have to use Basic but when I use them same time they collide with themselves
They both define a struct. Delete the struct definition from one of them.
The art of getting good answers lies in asking good questions.

Go Up