include "cv.h" brings in lots of header files, most them you probably don't need. This unnecessarily increases your build time. A better solution is only include the headers for the functions you are actually using. Unfortunately, this key information is missing from the ref manual. It really would be helpful if the documentation for each function listed the header files it needs and the .lib dependencies.