microsoft / opencv

Open Source Computer Vision Library
opencv.org
Apache License 2.0
144 stars 92 forks source link

CMake requires Windows Desktop SDK / Windows Phone '8.0' SDK #46

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hi there,

I'm attempting to build OpenCV but coming across this error. I'm pretty sure I have the SDK's installed, in fact I have the enterprise edition of Visual Studio 2015 RC installed. I checked for the SDK folders and they are there, plus I can obviously build for both phone and desktop in the IDE.

Any idea how to resolve this issue? Maybe it isn't compatible with 2015 yet?


cd opencv/platforms/winrt setup_winrt.bat "WP,WS" "8.0,8.1" "x86,ARM" -b


Security warning Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run C:\bob\opencv-master\opencv-master\platforms\winrt\setup_winrt.ps1? [D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): R DEBUG> Input Platforms: WP,WS DEBUG> WP is valid DEBUG> WS is valid DEBUG> Processed Platforms: WP WS DEBUG> Input Versions: 8.0,8.1 DEBUG> 8.0 is valid DEBUG> 8.1 is valid DEBUG> Processed Versions: 8.0 8.1 DEBUG> Input Architectures: x86,ARM DEBUG> x86 is valid DEBUG> ARM is valid DEBUG> Processed Architectures: x86 ARM INFO> ----------------------------------------------- INFO> Target: INFO> Directory: C:\bob\opencv-master\opencv-master\bin\WP\8.0\x86 INFO> Platform: WindowsPhone INFO> Version: 8.0 INFO> Architecture: x86 INFO> Generator: Visual Studio 12 2013 INFO> Install Directory: C:\bob\opencv-master\opencv-master\bin\insta ll\WP\8.0\x86

Directory: C:\bob\opencv-master\opencv-master\bin\WP\8.0

Mode LastWriteTime Length Name


d---- 26/05/2015 16:46 x86 INFO> Generating project: INFO> cmake -G Visual Studio 12 2013 -DCMAKE_SYSTEM_NAME:String=WindowsPhone -DC MAKE_SYSTEM_VERSION:String=8.0 -DCMAKE_VS_EFFECTIVE_PLATFORMS:String=x86 -DCMAKE _INSTALL_PREFIX:PATH=C:\bob\opencv-master\opencv-master\bin\install\WP\8. 0\x86 C:\bob\opencv-master\opencv-master CMake Error at CMakeLists.txt:88 (project): A Windows Phone component with CMake requires both the Windows Desktop SDK as well as the Windows Phone '8.0' SDK. Please make sure that you have both installed

-- Configuring incomplete, errors occurred! See also "C:/bob/opencv-master/opencv-master/bin/WP/8.0/x86/CMakeFiles/CM akeOutput.log". INFO> ----------------------------------------------- INFO> Building and installing project: INFO> Executing: msbuild OpenCV.sln /p:Configuration='Debug' /m Microsoft (R) Build Engine version 12.0.31010.0 [Microsoft .NET Framework, version 4.0.30319.0] Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist. Switch: OpenCV.sln INFO> Error: Failure executing command: msbuild OpenCV.sln /p:Configuration='Deb ug' /m

mkostin commented 9 years ago

AFAIK latest official CMake release does support using VS2015 as a generator and there is extra work in progress here but using OCV and CMake still require manual steps when used with VS2015.

Please use pre-generated projects to use with VS2015 in vs2015-samples branch. Take a look at the readme and the blog post about using these binaries with Windows 10 and VS2015 on Raspberri Pi.

On a separate note we've seen similar issue on Win8.1 and VS2013. If you hit it follow setup instructions in platforms/winrt readme and carefully check all the steps and dependencies.

EvgenyAgafonchikov commented 9 years ago

It looks like VS2015 RC creates corresponding 8.0 and 8.1 folders but doesn't adds all the required tools at least for desktop. Or adds them in a such way that current CMake validations cannot pass. I had to install VS2013 Community (w/ Windows 8.0 tools checkbox enabled) and VS2012 Express For Desktop before generation succeeded for 8.0 and 8.1 both.

Also, please note, that generator in your logs is defaulted to Visual Studio 12 2013 so you have to explicitly specify VS2015 using -g script option, e.g. -g "Visual Studio 14 2015". Script requires the following update in this case:

diff --git a/platforms/winrt/setup_winrt.ps1 b/platforms/winrt/setup_winrt.ps1
index ddd8286..363daff 100644
--- a/platforms/winrt/setup_winrt.ps1
+++ b/platforms/winrt/setup_winrt.ps1
@@ -54,7 +54,7 @@ Param(
     [parameter(Mandatory=$False)]
     [String]
     [ValidateNotNull()]
-    [ValidateSet("Visual Studio 12 2013","Visual Studio 11 2012")]
+    [ValidateSet("Visual Studio 12 2013","Visual Studio 11 2012","Visual Studio 14 2015")]
     $GENERATOR = "Visual Studio 12 2013",

     [parameter(Mandatory=$False)]
ghost commented 9 years ago

Thanks guys, I'll check out the pre-built libraries as suggested, I didn't actually want to build it myself anyway. Is there a nuget package available or one in the works? That would make things so much quicker.

ghost commented 9 years ago

Maybe I'm looking in the wrong place but I downloaded the branch as suggested and there don't seem to be any pre-build binaries in there, sample project folders with practically nothing in. Did I misunderstand you?

EvgenyAgafonchikov commented 9 years ago

There should be no pre-build binaries there are pre-generated projects you can build for the required configuration (look for them into vs2015 folder). Unfortunately currently there is no nuget package and its creation is not planned for now

mkostin commented 9 years ago

@nickpateman Please let us know if you've been able to build the binaries. I'm going to close this since there are no action items left.

ghost commented 9 years ago

I haven't had chance to try yet as I've been super busy, I'll try over the weekend, may as well close the issue though as if I can't compile in 2013 I'll post again. Cheers :)

Sent from my Windows Phone


From: Max Kostinmailto:notifications@github.com Sent: ‎09/‎06/‎2015 18:38 To: MSOpenTech/opencvmailto:opencv@noreply.github.com Cc: Nick Patemanmailto:nick@npSoftware.co.uk Subject: Re: [opencv] CMake requires Windows Desktop SDK / Windows Phone '8.0' SDK (#46)

@nickpatemanhttps://github.com/nickpateman Please let us know if you've been able to build the binaries. I'm going to close this since there are no action items left.

— Reply to this email directly or view it on GitHubhttps://github.com/MSOpenTech/opencv/issues/46#issuecomment-110442722.