Got it compiling with OpenCV. Such a headache of frameworks,libraries and links.