this is my second home, Feel Free To Explore~
map :call CompileRunGcc() func! CompileRunGcc() exec "w" exec "!g++ `pkg-config opencv --cflags --libs` % -o %<" exec "! ./%<" endfunc
http://www.linuxquestions.org/questions/programming-9/gcc-from-within-vim-481820/