user7852: This question is a little related to this one: How to compile and upload the specific (.cpp + .h) code?
I've installed MdbBillValidator to my arduino libraries collection. I tried both on ubuntu & windows.
How can I include it? Default inclusion, by arduino ide, was:
#include <MdbSerial.h>
#include <wiring_private.h>
#include <MdbBillValidator.h>
#include <MdbMaster.h>
#include <Arduino.h>

void loop() {

}

void setup() {

}

And here is error comes in:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp: In function ‘void __vector_37()’:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:289:23: error: ‘TXB8’ was not declared in this scope
       UCSR1B |= (1 << TXB8);
                       ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:291:24: error: ‘TXB8’ was not declared in this scope
       UCSR1B &= ~(1 << TXB8);
                        ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp: In function ‘void __vector_52()’:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:314:23: error: ‘TXB8’ was not declared in this scope
       UCSR2B |= (1 << TXB8);
                       ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:316:24: error: ‘TXB8’ was not declared in this scope
       UCSR2B &= ~(1 << TXB8);
                        ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp: In function ‘void __vector_55()’:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:339:23: error: ‘TXB8’ was not declared in this scope
       UCSR3B |= (1 << TXB8);
                       ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:341:24: error: ‘TXB8’ was not declared in this scope
       UCSR3B &= ~(1 << TXB8);
                        ^
In file included from /usr/lib/avr/include/avr/iom2560.h:38:0,
                 from /usr/lib/avr/include/avr/io.h:160,
                 from /usr/lib/avr/include/avr/pgmspace.h:88,
                 from /home/asiniy/sketchbook/libraries/MdbBillValidator/Arduino.h:8,
                 from /home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:31:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp: At global scope:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:554:135: error: expected ‘)’ before numeric constant
   MdbSerial MdbPort1(&rx_buffer1, &tx_buffer1, &UBRR1H, &UBRR1L, &UCSR1A, &UCSR1B, &UCSR1C, &UDR1, RXEN1, TXEN1, RXCIE1, UDRIE1, U2X1 UCSZ12, UCSZ11, UCSZ10, UPM11, UPM10, UMSEL11, UMSEL10);
                                                                                                                                       ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:554:189: error: no matching function for call to ‘MdbSerial::MdbSerial(ring_buffer*, ring_buffer*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, int, int, int, int, int, int, int, int, int, int, int)’
   MdbSerial MdbPort1(&rx_buffer1, &tx_buffer1, &UBRR1H, &UBRR1L, &UCSR1A, &UCSR1B, &UCSR1C, &UDR1, RXEN1, TXEN1, RXCIE1, UDRIE1, U2X1 UCSZ12, UCSZ11, UCSZ10, UPM11, UPM10, UMSEL11, UMSEL10);
                                                                                                                                                                                             ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:554:189: note: candidates are:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:352:1: note: MdbSerial::MdbSerial(ring_buffer*, ring_buffer*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)
 MdbSerial::MdbSerial(ring_buffer *rx_buffer, ring_buffer *tx_buffer,
 ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:352:1: note:   candidate expects 20 arguments, 19 provided
In file included from /home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:38:0:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.h:52:7: note: MdbSerial::MdbSerial(const MdbSerial&)
 class MdbSerial
       ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.h:52:7: note:   candidate expects 1 argument, 19 provided

What I need to do to avoid this error and get the code worked?

user8033: Could you try adding this to your program?
#define RXB8 1
#define TXB8 0
#define UPE 2
#define OVR 3
#define FE 4
#define UDRE 5
#define RXC 7

#define FRAMING_ERROR (1<<FE)
#define PARITY_ERROR (1<<UPE)
#define DATA_OVERRUN (1<<OVR)
#define DATA_REGISTER_EMPTY (1<<UDRE)
#define RX_COMPLETE (1<<RXC)

I found someone with similar code, who had these defines and as your code seems to miss/cannot find something, this might fix it.
Though I'm not sure if these defines apply in your specific implementation. For that I should have to see the code where the error is pointing at.

7852: <p>This question is a little related to this one: <a href="https://arduino.stackexchange.com/questions/9702/how-to-compile-and-upload-the-specific-cpp-h-code">How to compile and upload the specific (.cpp + .h) code?</a></p>

<p>I've installed <a href="https://github.com/justintconroy/MdbBillValidator" rel="nofollow noreferrer">MdbBillValidator</a> to my arduino libraries collection. I tried both on ubuntu &amp; windows.</p>

<p>How can I include it? Default inclusion, by arduino ide, was:</p>

<pre><code>#include &lt;MdbSerial.h&gt;
#include &lt;wiring_private.h&gt;
#include &lt;MdbBillValidator.h&gt;
#include &lt;MdbMaster.h&gt;
#include &lt;Arduino.h&gt;

void loop() {

}

void setup() {

}
</code></pre>

<p>And here is error comes in:</p>

<pre><code>/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp: In function ‘void __vector_37()’:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:289:23: error: ‘TXB8’ was not declared in this scope
       UCSR1B |= (1 &lt;&lt; TXB8);
                       ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:291:24: error: ‘TXB8’ was not declared in this scope
       UCSR1B &amp;= ~(1 &lt;&lt; TXB8);
                        ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp: In function ‘void __vector_52()’:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:314:23: error: ‘TXB8’ was not declared in this scope
       UCSR2B |= (1 &lt;&lt; TXB8);
                       ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:316:24: error: ‘TXB8’ was not declared in this scope
       UCSR2B &amp;= ~(1 &lt;&lt; TXB8);
                        ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp: In function ‘void __vector_55()’:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:339:23: error: ‘TXB8’ was not declared in this scope
       UCSR3B |= (1 &lt;&lt; TXB8);
                       ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:341:24: error: ‘TXB8’ was not declared in this scope
       UCSR3B &amp;= ~(1 &lt;&lt; TXB8);
                        ^
In file included from /usr/lib/avr/include/avr/iom2560.h:38:0,
                 from /usr/lib/avr/include/avr/io.h:160,
                 from /usr/lib/avr/include/avr/pgmspace.h:88,
                 from /home/asiniy/sketchbook/libraries/MdbBillValidator/Arduino.h:8,
                 from /home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:31:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp: At global scope:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:554:135: error: expected ‘)’ before numeric constant
   MdbSerial MdbPort1(&amp;rx_buffer1, &amp;tx_buffer1, &amp;UBRR1H, &amp;UBRR1L, &amp;UCSR1A, &amp;UCSR1B, &amp;UCSR1C, &amp;UDR1, RXEN1, TXEN1, RXCIE1, UDRIE1, U2X1 UCSZ12, UCSZ11, UCSZ10, UPM11, UPM10, UMSEL11, UMSEL10);
                                                                                                                                       ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:554:189: error: no matching function for call to ‘MdbSerial::MdbSerial(ring_buffer*, ring_buffer*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, int, int, int, int, int, int, int, int, int, int, int)’
   MdbSerial MdbPort1(&amp;rx_buffer1, &amp;tx_buffer1, &amp;UBRR1H, &amp;UBRR1L, &amp;UCSR1A, &amp;UCSR1B, &amp;UCSR1C, &amp;UDR1, RXEN1, TXEN1, RXCIE1, UDRIE1, U2X1 UCSZ12, UCSZ11, UCSZ10, UPM11, UPM10, UMSEL11, UMSEL10);
                                                                                                                                                                                             ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:554:189: note: candidates are:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:352:1: note: MdbSerial::MdbSerial(ring_buffer*, ring_buffer*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, volatile uint8_t*, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)
 MdbSerial::MdbSerial(ring_buffer *rx_buffer, ring_buffer *tx_buffer,
 ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:352:1: note:   candidate expects 20 arguments, 19 provided
In file included from /home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.cpp:38:0:
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.h:52:7: note: MdbSerial::MdbSerial(const MdbSerial&amp;)
 class MdbSerial
       ^
/home/asiniy/sketchbook/libraries/MdbBillValidator/MdbSerial.h:52:7: note:   candidate expects 1 argument, 19 provided
</code></pre>

<p>What I need to do to avoid this error and get the code worked?</p>
 8033: <p>Could you try adding this to your program?</p>

<pre><code>#define RXB8 1
#define TXB8 0
#define UPE 2
#define OVR 3
#define FE 4
#define UDRE 5
#define RXC 7

#define FRAMING_ERROR (1&lt;&lt;FE)
#define PARITY_ERROR (1&lt;&lt;UPE)
#define DATA_OVERRUN (1&lt;&lt;OVR)
#define DATA_REGISTER_EMPTY (1&lt;&lt;UDRE)
#define RX_COMPLETE (1&lt;&lt;RXC)
</code></pre>

<p>I found someone with similar code, who had these defines and as your code seems to miss/cannot find something, this might fix it.
Though I'm not sure if these defines apply in your specific implementation. For that I should have to see the code where the error is pointing at.</p>
