See the Don't Panic page for some examples of how to interface SICStus with C++. The examples use Microsoft Visual C++, but the same technique can be adapted to other compilers (e.g. gcc under UNIX).
gcc