Thanks very much raytaller for the project / explanation!
I usually work at linux but my programs need to be able to run on windows too, right?
I had the same error as ulao first, and hundreds of these errors:
warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
And a crash when running pview.exe.
But when I replaced _DEBUG with NDEBUG it worked fine