The recommended PubNub SDK for Raspberry Pi is POSIX C:
https://github.com/pubnub/c-core/tree/master/posix
For C++ :
https://github.com/pubnub/c-core/tree/master/cpp
You can also use any PubNub SDK on Linux, like:
https://github.com/pubnub/python
https://github.com/pubnub/java
https://github.com/pubnub/javascript