External VS2013 build error “error MSB4019: The im

2019-07-21 06:20发布

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]

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

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

I see only

The system cannot find the file specified.

Any ideas?

THANKS!

**

  • UPDATE

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 . . .

**

2条回答
【Aperson】
2楼-- · 2019-07-21 06:40

did you saw "cmake fail" when builded ?
are you thinking it's ok ?
here fixed files for VS2013 : http://amv007.zz.mu/temp/build.zip

查看更多
再贱就再见
3楼-- · 2019-07-21 06:46

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.
查看更多
登录 后发表回答