Finally (thanks to the invaluable help of Jorge Almeida) I managed to port the arduino xbee library to C++. According to the library website (xbee-arduino) the code could depended only on the serial library and on the millis function. The millis were substituted by the "gettimeofday" function, and the serial lib was substituted by our lab serial lib, written by Ricardo Pascoal.
I managed to compose and send an API packet from a computer program as well as receive and parse a package.
Next step is to cleanup the code, and use the new xbee lib in the program that will be responsible for sending/receiving messages to the modems.