secondsun / arduino-tvout

Automatically exported from code.google.com/p/arduino-tvout
0 stars 0 forks source link

pollserial.h:46 error #50

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
How can I fix this error?:

In file included from NTSCserialTerm.cpp:2:
C:\Users\Person\Desktop\arduino-1.0.1\libraries\pollserial/pollserial.h:46: 
error: conflicting return type specified for 'virtual void 
pollserial::write(uint8_t)'
C:\Users\Person\Desktop\arduino-1.0.1\hardware\arduino\cores\arduino/Print.h:48:
 error:   overriding 'virtual size_t Print::write(uint8_t)'

Original issue reported on code.google.com by cosma.ch...@gmail.com on 15 Jun 2012 at 11:05

GoogleCodeExporter commented 9 years ago
I managed to duplicate this error under Arduino version 1.0 as well as 1.0.1

Original comment by britt...@gmail.com on 25 Jun 2012 at 12:16

GoogleCodeExporter commented 9 years ago
i cant get it to work either

Original comment by YoshiFan...@gmail.com on 6 Jul 2012 at 1:38

GoogleCodeExporter commented 9 years ago
The Arduino signature for write says "returns byte - 
write() will return the number of bytes written, though reading that number is 
optional"

So, pollserial.h needs to change line 46 to "virtual size_t write(uint8_t);"
instead of void.

Also, pollserial.c line 131 to "size_t pollserial::write(uint8_t c) {" plus add 
a return statement in the function.

Original comment by brianez21 on 11 Jul 2012 at 6:11

GoogleCodeExporter commented 9 years ago
Followed this (from another thread 
http://code.google.com/p/arduino-tvout/issues/detail?id=47) and got this error

Print.cpp:126: error: 'ht1632c' has not been declared

Original comment by ronan...@gmail.com on 26 Jul 2012 at 4:03

GoogleCodeExporter commented 9 years ago
brianez: pollserial.c -> size_t pollserial::write(uint8_t c) return with what? 

Original comment by felan...@gmail.com on 14 Jul 2013 at 3:35

GoogleCodeExporter commented 9 years ago
I also got this error when compiling with Arduino 1.05. 

1. Per Brianez21 excellent answer, thank you.  I had to open up the .h and .cpp 
files with an external editor, (not the Aruduino editor....because it wouldn't 
open .cpp files. 

2. @Felan, To complete the return statement, put in a "return c;" at the end of 
the function.  (see the read function above just above the write function for 
how i should look).

The program compiles without errors now. 

3. I tested this first by simply opening a serial port session with the Mac 
terminal program. 
That seemed to be a bit rough around the edges, so I  downloaded Cool-Term, and 
configured it for the USB serial port, at 57600. I also turned on the local 
echo so I could see what I was typing in the terminal window, and it now 
appears on the TV. 

I've just ordered the nootropic video overlay shield for this.  Now I'm 
confident, it will probably work.  

Many thanks to everyone who posted questions and solutions!      

Original comment by lkeye...@gmail.com on 16 Jul 2013 at 12:13

GoogleCodeExporter commented 9 years ago
Thank you friends, I have done the suggested corrections and it worked here.
See attached the corrected files.

Original comment by tony...@gmail.com on 24 Aug 2013 at 6:10

Attachments: