If you're using a recent version of PCL, you'll probably need to
compile rgbdemo from github, which supports recent PCL.
git clone --recursive git://github.com/nburrus/rgbdemo.git
Please let us know if you still get issues,
Cheers,
Nicolas
Visual studio compiler is not compatible with GCC/Mingw, so if you start
using one, you have to keep using only that one. So you should compile
OpenCV with Visual Studio also.
Also, "it is crashing somehow" is not very helpful for us to give you a
more elaborate anwser :) Can you try in debug mode, and send the
backtrace? Or give any error message you see by launching the binary
from the command line?
Cheers,
Nicolas
Otherwise compile and install opencv with the final "make install" step.
Cheers,
Nicolas