外部VS2013构建错误“错误MSB4019:导入的项目< path>没找到" [英] External VS2013 build error “error MSB4019: The imported project <path> was not found”

查看:124
本文介绍了外部VS2013构建错误“错误MSB4019:导入的项目< path>没找到"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用CMake文件从命令舞会构建项目. 可以在此处找到该项目.

I building a project from a command proms using CMake file. The project can be found here.

在构建中,我遇到以下错误:

On the build I have the following error:

"C:\Users\User\Desktop\XMP-Toolkit-SDK-CC201306\build\vc10\static\windows_x64\CMakeFiles\3.0.0\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.Redirect.props(44,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Platform.Redirect.10.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\User\Desktop\XMP-Toolkit-SDK-CC201306\build\vc10\static\windows_x64\CMakeFiles\3.0.0\CompilerIdC\CompilerIdC.vcxproj]

我知道应该是因为该项目在Visual Studio 2010中,并且我正在为Visual Studi 2013执行.

I know that it should be because the project is in Visual Studio 2010 and I am executing for Visual Studi 2013.

我看到了一些答案,例如 ,但它们不适合我的情况.我没有.csproj文件,并且在运行时

I saw some answers like this, but they don't fit my case. I don't have .csproj file and when running

C:\Program Files (x86)\MSBuild\12.0\Bin\amd64>MSBuild.exe <project or solution t
o build> /p:VisualStudioVersion=12.0

我只能看到

The system cannot find the file specified.

有什么想法吗?

谢谢!

**

  • 更新

使用Maskim提供的存档,该版本跳过了错误,但提供了新的错误.我将在下面粘贴cmd进程的结尾:

Using the archive provided by Maskim, the build skipped the error, but instead provided new errors. I am pasting almost the end of the cmd process below:

C:\Users\User\Desktop\XMP-Toolkit-SDK-CC201306\build>echo "================= Gen
erate project for XMP build ================="
"================= Generate project for XMP build ================="

C:\Users\User\Desktop\XMP-Toolkit-SDK-CC201306\build>call cmake.bat 64 2013 Warn
ingAsError Static

C:\Users\User\Desktop\XMP-Toolkit-SDK-CC201306\build>echo OFF
64 bit specified
"Generator VS 2013 specified"
"sensible warnings activated"
"Static build on"
CMakeFolder: "vc13/static/windows_x64"
Generator used: Visual Studio 12 Win64
cmake ../../../. -G"Visual Studio 12 Win64" -DXMP_CMAKEFOLDER_NAME=""vc13/static
/windows_x64"" -DCMAKE_CL_64=ON -DCMAKE_ARCH=x64 -DXMP_BUILD_WARNING_AS_ERROR=On
 -DXMP_BUILD_STATIC="On"
-- The C compiler identification is MSVC 18.0.31101.0
-- The CXX compiler identification is MSVC 18.0.31101.0
-- Check for working C compiler using: Visual Studio 12 2013 Win64
-- Check for working C compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
COMMON_BUILD_SHARED_DIR= C:/Users/User/Desktop/XMP-Toolkit-SDK-CC201306/build/..
/build/shared
CMake Error: Error in cmake code at
C:/Users/User/Desktop/XMP-Toolkit-SDK-CC201306/XMPCore/build/CMakeLists.txt:170:

Parse error.  Function missing ending ")".  Instead found bad character with tex
t "[".
CMake Error: Error in cmake code at
C:/Users/User/Desktop/XMP-Toolkit-SDK-CC201306/XMPFiles/build/CMakeLists.txt:284
:
Parse error.  Function missing ending ")".  Instead found bad character with tex
t "[".
-- ===========================================================================
--  XMPToolkitSDK
-- ===========================================================================
--  64 bit build is: 1
--  Static build is: On
--  XMPToolkitSDK
--
--
--  Compiler:
--  CC=C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.e
xe
--  CXX=C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.
exe
-- ===========================================================================
-- Configuring incomplete, errors occurred!
See also "C:/Users/User/Desktop/XMP-Toolkit-SDK-CC201306/build/vc13/static/windo
ws_x64/CMakeFiles/CMakeOutput.log".
Failed XMP build cmake.
"Exiting CMakeUtils.bat"
Failed  build cmake.
"Exiting cmake.bat"
Failed.
"Exiting cmake_all.bat"
CMake Build Failed.
Press any key to continue . . .

**

推荐答案

现在让我们不清楚的问题是,它可以在我的PC上使用VS2013构建,可以更简单地进行构建,例如c:\ dev \ XMP. .
我的日志:

Now problem us unclear for me, its building ok on my PC with VS2013, may be more simply path for build, like c:\dev\XMP...
My log :

c:\dev\XMP-Toolkit-SDK-CC201306\build>echo "================= Generate project f
or XMP build ================="
"================= Generate project for XMP build ================="

c:\dev\XMP-Toolkit-SDK-CC201306\build>call cmake.bat 64 2013 WarningAsError Stat
ic

c:\dev\XMP-Toolkit-SDK-CC201306\build>echo OFF
64 bit specified
"Generator VS 2013 specified"
"sensible warnings activated"
"Static build on"
CMakeFolder: "vc13/static/windows_x64"
Generator used: Visual Studio 12 Win64
cmake ../../../. -G"Visual Studio 12 Win64" -DXMP_CMAKEFOLDER_NAME=""vc13/static
/windows_x64"" -DCMAKE_CL_64=ON -DCMAKE_ARCH=x64 -DXMP_BUILD_WARNING_AS_ERROR=On
 -DXMP_BUILD_STATIC="On"
-- The C compiler identification is MSVC 18.0.30723.0
-- The CXX compiler identification is MSVC 18.0.30723.0
-- Check for working C compiler using: Visual Studio 12 2013 Win64
-- Check for working C compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64
-- Check for working CXX compiler using: Visual Studio 12 2013 Win64 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
COMMON_BUILD_SHARED_DIR= C:/dev/XMP-Toolkit-SDK-CC201306/build/../build/shared
-- ===========================================================================
--  XMPCore64
-- ===========================================================================
--  OUTPUT_DIR = C:/dev/XMP-Toolkit-SDK-CC201306/XMPCore/build/../../public/libr
aries/windows_x64/$(configuration)
-- ===========================================================================
--  XMPFiles64
-- ===========================================================================
--  OUTPUT_DIR = C:/dev/XMP-Toolkit-SDK-CC201306/XMPFiles/build/../../public/lib
raries/windows_x64/$(configuration)
-- ===========================================================================
--  XMPToolkitSDK
-- ===========================================================================
--  64 bit build is: 1
--  Static build is: On
--  XMPToolkitSDK
--
--
--  Compiler:
--  CC=C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.e
xe
--  CXX=C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/x86_amd64/cl.
exe
-- ===========================================================================
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_ARCH
    XMP_BUILD_WARNING_AS_ERROR


-- Build files have been written to: C:/dev/XMP-Toolkit-SDK-CC201306/build/vc13/
static/windows_x64
Success XMP build cmake.
"Exiting CMakeUtils.bat"
Success  build cmake.
"Exiting cmake.bat"
Success.
"Exiting cmake_all.bat"
CMake Build Success.

这篇关于外部VS2013构建错误“错误MSB4019:导入的项目&lt; path&gt;没找到"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆