Help building cpp code with opencv

See my response here:

I used a pre-compiled OpenCV version. This is the only solution that worked for me.