Fix compile in MacOSX, issues pending

* Several compilation warnings
* Utils work
* Only 50% of tests pass
* Samples work
* Examples don't work