That kind of depends on what exactly you want. I put an example in Boost.Extension that automatically compiles arbitrary code (using Boost.Build - but you could modify it for other compilers) into a shared library and then loads and runs it:
http://svn.boost.org/trac/boost/browser/sandbox/libs/extension/examples/runtime_compilationI haven't gotten around to writing documentation for the example, but plan to do it in the next few weeks. The code is relatively straightforward though.
As far as a full scripting environment for C++, there are full libraries that do this - but you'd have a tough time persuading me that Python or another actual scripting language (perhaps with Boost.Python) wasn't a better solution. I guess if all you have is a hammer...
Jeremy Pack
http://boost-extension.blogspot.com