glcd.h not jiving with sdfat.h

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
great_scott
 
Posts: 2
Joined: Wed Feb 01, 2012 8:26 pm

glcd.h not jiving with sdfat.h

Post by great_scott »

Made a number of test sketches to test my circuits and now I'm wanting to combine datalogging using the sdfat.h with my Glcd HMI using the glcd.h but I get an error when trying to compile.

In file included from C:\arduino-1.0\libraries\SdFat/SdStream.h:27,
from C:\arduino-1.0\libraries\SdFat/SdFat.h:27,
from ECAR_1.cpp:2:
C:\arduino-1.0\libraries\SdFat/iostream.h: In function 'ostream& endl(ostream&)':
C:\arduino-1.0\libraries\SdFat/iostream.h:40: error: 'ostream& endl(ostream&)' redeclared as different kind of symbol
C:\arduino-1.0\libraries\glcd/include/Streaming.h:80: error: previous declaration of '_EndLineCode endl'


I'm guessing endl is used differently in one file than it is in the other. I just can't pin it down.
Any help would be appreciated.
Attachments
ecar_1.txt
Cut and pasted from arduino 1.0
(11.59 KiB) Downloaded 184 times

TrentStevenson
 
Posts: 2
Joined: Sun Sep 23, 2012 1:30 am

Re: glcd.h not jiving with sdfat.h

Post by TrentStevenson »

Did you find a solution?

great_scott
 
Posts: 2
Joined: Wed Feb 01, 2012 8:26 pm

Re: glcd.h not jiving with sdfat.h

Post by great_scott »

That's been so long ago, after a little research I found where I remarked the code in the streaming.h

//enum _EndLineCode { endl };\\remarked these guys for troubleshooting

//inline Print &operator <<(Print &obj, _EndLineCode arg) \\remarked these guys for troubleshooting
//{ obj.println(); return obj; } \\remarked these guys for troubleshooting

I was using this on arduino mega2560. I also found the mega2560 uses more current than spec estimates.
I ended up driving it with a 12vt supply rather then the usb 5 vt port.
having a 12 input thermocouple card I built and glcd and 10 port pressure input card I built.
When adding total power consumption calculated over 1 amp.

TrentStevenson
 
Posts: 2
Joined: Sun Sep 23, 2012 1:30 am

Re: glcd.h not jiving with sdfat.h

Post by TrentStevenson »

great_scott wrote:That's been so long ago, after a little research I found where I remarked the code in the streaming.h

//enum _EndLineCode { endl };\\remarked these guys for troubleshooting

//inline Print &operator <<(Print &obj, _EndLineCode arg) \\remarked these guys for troubleshooting
//{ obj.println(); return obj; } \\remarked these guys for troubleshooting

I was using this on arduino mega2560. I also found the mega2560 uses more current than spec estimates.
I ended up driving it with a 12vt supply rather then the usb 5 vt port.
having a 12 input thermocouple card I built and glcd and 10 port pressure input card I built.
When adding total power consumption calculated over 1 amp.
Yeah cheers, I decided to comment out one of the endline operators from one of the libraries also. Though I'm apprehensive about doing this as any internal calls using << endl within the library will likely not be handled correctly and cause god knows what problems.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”