Made loadbby to build on ubuntu. re #10091

here changed strongly typed enum to C++03 compatable enum, template variable was passed as temperatory object which (note the need for this was not fully understood), and removed various warnings