I'm sorry, I don't see what is wrong here. I think you'll have to break it down further to debug. For example, you say this line is the problem:
Code:
for(vector<PositionMaterialNormal>::const_iterator it = mesh.getVertices().begin(); it != mesh.getVertices().end(); ++it)
So what if you remove all the for loop and just try compiling this line:
Code:
vector<PositionMaterialNormal>::const_iterator it = mesh.getVertices().begin();
Or if that doesn't work can you break it down further:
Code:
vector<PositionMaterialNormal> vertices = mesh.getVertices(); // <-- Could also try making a reference here?
vector<PositionMaterialNormal>::iterator = vertices.begin(); // Try with iterator vs. const_iterator?
Can you see where exactly it is failing? Otherwise could you restructure the loop so that it uses indices into the vector instead of iterators?
It could also be that the code is out-of-date with regard to PolyVox/Ogre, to be honest I don't remember exactly how the interface looks so you might have to dive into the PolyVox source code.