I want to create a batch file that builds several Visual Studio 2010 projects. My project property sheet is setup to use opencv, and building from Visual Studio works fine, but when I run the MSBuild command from cmd, it doesn’t find the OpenCV header files. I get many of the following messages:
c:\proj\libproj\cvtrack.cpp(26): fatal error C1083: Cannot open include file: 'cv.h': No such file or directory [C:\proj\libproj\libproj.vcxproj]
Any ideas?
I fixed this by adding the following parameter to the MSBuild command, /p:Configuration=Release
, and then changein the project’s Release properties.