NithishChauhan, answering your prvious question, there's no VM image available for something like a Galileo simulator (though I think that should be possible with qemu and some time spent on configuring it properly), however there's something called "cross-compilation toolchain", which is in the Downloads section of this community. It's available for Linux, Windows and Mac, you just download it, unpack/install and you can compile programs for Galileo on your normal PC.
As far as the error is concerned, the images are blurred (by the way, why don't you just copy and paste the text from the terminal? I guess making and uploading photos is more hassle than that), but it looks to me like you're using single quotation marks instead of backticks in that command, so it doesn't work.
It should be
g++ `pkg-config opencv --cflags --libs` -o opencv_ex2