This post was updated on .
Hi
I am trying to generate a project using cmake for visual studio. When I try to configure in cmake, the *following error message *appears: CMake Error at CMakeLists.txt:2 (project): Failed to run MSBuild command: C:/Program Files/MSBuild/14.0/bin/MSBuild.exe to get the value of VCTargetsPath: Microsoft (R) Build Engine version 14.0.25420.1 Copyright (C) Microsoft Corporation. All rights reserved. Build started 7/5/2018 9:49:44 AM. Project "D:\IISTintern\VS2010\Projects\15_VS_FeatExtn\build\CMakeFiles\3.11.4\VCTargetsPath.vcxproj" on node 1 (default targets). D:\IISTintern\VS2010\Projects\15_VS_FeatExtn\build\CMakeFiles\3.11.4\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. Done Building Project "D:\IISTintern\VS2010\Projects\15_VS_FeatExtn\build\CMakeFiles\3.11.4\VCTargetsPath.vcxproj" (default targets) -- FAILED. Build FAILED. "D:\IISTintern\VS2010\Projects\15_VS_FeatExtn\build\CMakeFiles\3.11.4\VCTargetsPath.vcxproj" (default target) (1) -> D:\IISTintern\VS2010\Projects\15_VS_FeatExtn\build\CMakeFiles\3.11.4\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "D:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.58 Exit code: 1 How to rectify this error? I am using Visual studio 2015 professional edition (Windows 32 bit machine) and PCL Version is 1.8.1. I have installed PCL using All-in-one installer. *My cmakeLists.txt file:* cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project(3dFeatureExtraction) find_package(PCL 1.2 REQUIRED) include_directories(${PCL_INCLUDE_DIRS}) link_directories(${PCL_LIBRARY_DIRS}) add_definitions(${PCL_DEFINITIONS}) add_executable (3dFeatureExtraction 3dFeatureExtraction.cpp) target_link_libraries (3dFeatureExtraction ${PCL_LIBRARIES}) -- Sent from: http://www.pcl-users.org/ _______________________________________________ PCL-users@pointclouds.org / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users |
D:\IISTintern\VS2010\Projects\15_VS_FeatExtn\build\CMakeFiles\3.11.4\VCTargetsPath.vcxproj(14,2): That's the problem, it's telling you it can't find that file. I don't know that this actually has anything to do with PCL. I don't have answers, you'll have to hunt. See some of the answers here for possible fixes: https://stackoverflow.com/questions/16092169/why-does-msbuild-look-in-c-for-microsoft-cpp-default-props-instead-of-c-progr I think maybe it's because you are building on D:\ rather than C:\, so perhaps this answer in particular may help: If those files exist on the C:\ drive, you may be able to set those environment variables? Please understand that these are guesses, before taking drastic measures (like trying to "fix .NET"), consult your internship mentor (s). I suggest creating a very simple cmake project that just adds one executable (a hello world project for example), without looking for PCL or anything else. I suspect you'll get the same error with a hello world project (aka I believe this is an issue with your local development setup). Good luck, hope that steers you in the right direction! _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users |
Thank you so much Stephen. This link helped to resolve the issue:
https://stackoverflow.com/a/16093446 I fixed it by adding a String VCTargetsPath with value $(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\V140 in the registry path HKLM\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0 -- Sent from: http://www.pcl-users.org/ _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users |
Joyous day!!! You're welcome, thank you also for posting what fixed this for you in case others hit this. Have fun with PCL :) On Thu, Jul 5, 2018, 4:20 AM shibujrm <[hidden email]> wrote: Thank you so much Stephen. This link helped to resolve the issue: _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users |
Free forum by Nabble | Edit this page |