Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Finally I find a solutation. There is a file called Microsoft.Cpp.Win32.user.props in C:\Users\Administrator\AppData\Local\Microsoft\MSBuild\v4.0. We can write code in it directly to change settings.

 <PropertyGroup>
<IncludePath>D:\2411\opencv\build\include;D:\2411\opencv\build\include\opencv;D:\2411\opencv\build\include\opencv2;$(IncludePath)</IncludePath>
<LibraryPath>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;$(LibraryPath)</LibraryPath>

</propertygroup>

Finally Maybe it is a bug of VS 2012. And finally I find a solutation. There is a file called Microsoft.Cpp.Win32.user.props in C:\Users\Administrator\AppData\Local\Microsoft\MSBuild\v4.0. We can write code in it directly to change settings.

 <PropertyGroup>
<IncludePath>D:\2411\opencv\build\include;D:\2411\opencv\build\include\opencv;D:\2411\opencv\build\include\opencv2;$(IncludePath)</IncludePath>
<LibraryPath>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;$(LibraryPath)</LibraryPath>

</propertygroup>

Maybe it is a bug of VS 2012. And finally I find a solutation. There is a file Microsoft.Cpp.Win32.user.props in C:\Users\Administrator\AppData\Local\Microsoft\MSBuild\v4.0. We can write code in it directly to change settings.

<project defaulttargets="Build" toolsversion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <IncludePath>D:\2411\opencv\build\include;D:\2411\opencv\build\include\opencv;D:\2411\opencv\build\include\opencv2;$(IncludePath)</IncludePath> <LibraryPath>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;$(LibraryPath)</LibraryPath>

</propertygroup> <importgroup label="PropertySheets"> </importgroup> <propertygroup label="UserMacros"/> <propertygroup> <includepath>D:\2411\opencv\build\include;D:\2411\opencv\build\include\opencv;D:\2411\opencv\build\include\opencv2;$(IncludePath)</includepath> <librarypath>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;$(LibraryPath)</librarypath> </propertygroup> <itemdefinitiongroup> <clcompile> <runtimelibrary>MultiThreadedDebug</runtimelibrary> </clcompile> <link> <additionaldependencies>opencv_calib3d2411d.lib;opencv_contrib2411d.lib;opencv_core2411d.lib;opencv_features2d2411d.lib;opencv_flann2411d.lib;opencv_gpu2411d.lib;opencv_highgui2411d.lib;opencv_imgproc2411d.lib;opencv_legacy2411d.lib;opencv_ml2411d.lib;opencv_nonfree2411d.lib;opencv_objdetect2411d.lib;opencv_ocl2411d.lib;opencv_photo2411d.lib;opencv_stitching2411d.lib;opencv_superres2411d.lib;opencv_ts2411d.lib;opencv_video2411d.lib;opencv_videostab2411d.lib;%(AdditionalDependencies)</additionaldependencies> <additionallibrarydirectories>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;%(AdditionalLibraryDirectories)</additionallibrarydirectories> </link> </itemdefinitiongroup> <itemgroup/> </project>

Maybe it is a bug of VS 2012. And finally I find a solutation. There is a file Microsoft.Cpp.Win32.user.props in C:\Users\Administrator\AppData\Local\Microsoft\MSBuild\v4.0. We can write code in it directly to change settings. The code is shown below.

<project defaulttargets="Build" toolsversion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <importgroup label="PropertySheets"> </importgroup> <propertygroup label="UserMacros"/> <propertygroup> <includepath>D:\2411\opencv\build\include;D:\2411\opencv\build\include\opencv;D:\2411\opencv\build\include\opencv2;$(IncludePath)</includepath> <librarypath>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;$(LibraryPath)</librarypath> </propertygroup> <itemdefinitiongroup> <clcompile> <runtimelibrary>MultiThreadedDebug</runtimelibrary> </clcompile> <link> <additionaldependencies>opencv_calib3d2411d.lib;opencv_contrib2411d.lib;opencv_core2411d.lib;opencv_features2d2411d.lib;opencv_flann2411d.lib;opencv_gpu2411d.lib;opencv_highgui2411d.lib;opencv_imgproc2411d.lib;opencv_legacy2411d.lib;opencv_ml2411d.lib;opencv_nonfree2411d.lib;opencv_objdetect2411d.lib;opencv_ocl2411d.lib;opencv_photo2411d.lib;opencv_stitching2411d.lib;opencv_superres2411d.lib;opencv_ts2411d.lib;opencv_video2411d.lib;opencv_videostab2411d.lib;%(AdditionalDependencies)</additionaldependencies> <additionallibrarydirectories>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;%(AdditionalLibraryDirectories)</additionallibrarydirectories> </link> </itemdefinitiongroup> <itemgroup/> </project>

Maybe it is a bug of VS 2012. And finally I find a solutation. There is a file Microsoft.Cpp.Win32.user.props in C:\Users\Administrator\AppData\Local\Microsoft\MSBuild\v4.0. We can write code in it directly to change settings. The code is shown below.

<?xml version="1.0" encoding="utf-8"?>

<project defaulttargets="Build" toolsversion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <importgroup label="PropertySheets"> </importgroup> <propertygroup label="UserMacros"/> <propertygroup> <includepath>D:\2411\opencv\build\include;D:\2411\opencv\build\include\opencv;D:\2411\opencv\build\include\opencv2;$(IncludePath)</includepath> <librarypath>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;$(LibraryPath)</librarypath> </propertygroup> <itemdefinitiongroup> <clcompile> <runtimelibrary>MultiThreadedDebug</runtimelibrary> </clcompile> <link> <additionaldependencies>opencv_calib3d2411d.lib;opencv_contrib2411d.lib;opencv_core2411d.lib;opencv_features2d2411d.lib;opencv_flann2411d.lib;opencv_gpu2411d.lib;opencv_highgui2411d.lib;opencv_imgproc2411d.lib;opencv_legacy2411d.lib;opencv_ml2411d.lib;opencv_nonfree2411d.lib;opencv_objdetect2411d.lib;opencv_ocl2411d.lib;opencv_photo2411d.lib;opencv_stitching2411d.lib;opencv_superres2411d.lib;opencv_ts2411d.lib;opencv_video2411d.lib;opencv_videostab2411d.lib;%(AdditionalDependencies)</additionaldependencies> <additionallibrarydirectories>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;%(AdditionalLibraryDirectories)</additionallibrarydirectories> </link> </itemdefinitiongroup> <itemgroup/> </project>

Maybe it is a bug of VS 2012. And finally I find a solutation. There is a file Microsoft.Cpp.Win32.user.props in C:\Users\Administrator\AppData\Local\Microsoft\MSBuild\v4.0. We can write code in it directly to change settings. The code is shown below.

 <?xml version="1.0" encoding="utf-8"?>

<project defaulttargets="Build" toolsversion="12.0" <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <importgroup label="PropertySheets"> <ImportGroup Label="PropertySheets"> </importgroup> </ImportGroup> <propertygroup label="UserMacros"/> <PropertyGroup Label="UserMacros" /> <propertygroup> <PropertyGroup> <includepath>D:\2411\opencv\build\include;D:\2411\opencv\build\include\opencv;D:\2411\opencv\build\include\opencv2;$(IncludePath)</includepath> <IncludePath>D:\2411\opencv\build\include;D:\2411\opencv\build\include\opencv;D:\2411\opencv\build\include\opencv2;$(IncludePath)</IncludePath> <librarypath>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;$(LibraryPath)</librarypath> <LibraryPath>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;$(LibraryPath)</LibraryPath> </propertygroup> </PropertyGroup> <itemdefinitiongroup> <ItemDefinitionGroup> <clcompile> <ClCompile> <runtimelibrary>MultiThreadedDebug</runtimelibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> </clcompile> </ClCompile> <link> <Link> <additionaldependencies>opencv_calib3d2411d.lib;opencv_contrib2411d.lib;opencv_core2411d.lib;opencv_features2d2411d.lib;opencv_flann2411d.lib;opencv_gpu2411d.lib;opencv_highgui2411d.lib;opencv_imgproc2411d.lib;opencv_legacy2411d.lib;opencv_ml2411d.lib;opencv_nonfree2411d.lib;opencv_objdetect2411d.lib;opencv_ocl2411d.lib;opencv_photo2411d.lib;opencv_stitching2411d.lib;opencv_superres2411d.lib;opencv_ts2411d.lib;opencv_video2411d.lib;opencv_videostab2411d.lib;%(AdditionalDependencies)</additionaldependencies> <AdditionalDependencies>opencv_calib3d2411d.lib;opencv_contrib2411d.lib;opencv_core2411d.lib;opencv_features2d2411d.lib;opencv_flann2411d.lib;opencv_gpu2411d.lib;opencv_highgui2411d.lib;opencv_imgproc2411d.lib;opencv_legacy2411d.lib;opencv_ml2411d.lib;opencv_nonfree2411d.lib;opencv_objdetect2411d.lib;opencv_ocl2411d.lib;opencv_photo2411d.lib;opencv_stitching2411d.lib;opencv_superres2411d.lib;opencv_ts2411d.lib;opencv_video2411d.lib;opencv_videostab2411d.lib;%(AdditionalDependencies)</AdditionalDependencies> <additionallibrarydirectories>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;%(AdditionalLibraryDirectories)</additionallibrarydirectories> <AdditionalLibraryDirectories>D:\2411\opencv\build\x86\vc12\lib;D:\2411\opencv\build\x86\vc12\staticlib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> </link> </Link> </itemdefinitiongroup> </ItemDefinitionGroup> <itemgroup/> </project>

<ItemGroup /> </Project>