C++ XBee Arduino Library adopted for Raspberry Pi.
This code uses WiringPi Library
Here is a simple example AtCommand, which is an analogue of the example for arduino from the library AtCommand.pde. The rest of the examples can be rewritten in a similar way.
To build and run this example use g++:
g++ AtCommand.cpp -o AtCommand -lwiringPi
sudo ./AtCommand
Before building, make sure that the WiringPy library is installed and the serial port you are using (in this example /dev/ttyS0 with baudrate 115200 is used Serial.begin("/dev/ttyS0", 115200);
) is activated