Which OpenCV libraries do I need for VideoWriter ?

I am currently testing some video encoding times for a computer vision project that I am working on using the OpenCV video functionality in windows. I hate wrestling with all of the OpenCV library files, but to use VideoWriter you just need to use the following libs:

opencv_coreXXX.lib
opencv_highguiXXX.lib

Where XXX is the version number of the libs that you are using, so for example on the software project that I am currently working on, I need to include:

opencv_core246.lib
opencv_highgui246.lib

You will need to have the corresponding .dll files on your path as well to run your program.