I tried out of the root shell and still it doesnt work. I have now looked a bit more closely at the error "libhildonmm-1.0.so.5 error missing shared libaray". When I look in /usr/lib I cannot see this file or any "mm" C++ library files.
I was also trying to run the program by simply typing in the name "helloworld" and I would get the erorr, "no such file or directory". I hadnt realised that I need to type the full path and filename to get it to run. Hence the reason why I was using run-standalone.sh!