The code is simple and is essentially straight from this tutorial. I am running Arch Linux and have the OpenCV library stored at /usr/include/. I have also chec
if anyone still having this problem. One solution is to rebuild the source OpenCV library using MinGW and not use the binaries given by OpenCV. I did it and it worked like a charm.