Compile Blaze on MSVC with VCPKG

Issue #236 resolved
Frank Drop created an issue

I installed blaze on windows10 using the VCPKG manager (which required me to install blaze:x64-windows, because openblas does not have x86 windows support) I get errors when trying to compile the following:

#include <iostream>
#include <blaze/Blaze.h>

int main(int argc, char** argv)
{
    std::cout << "hello" << std::endl;
    return 0;
}
1>------ Build started: Project: Project1, Configuration: Release x64 ------
1>blaze_test.cpp
1>e:\vcpkg\installed\x64-windows\include\blaze\math\typetraits\issimdenabled.h(76): error C2760: syntax error: unexpected token '>', expected ')'
1>e:\vcpkg\installed\x64-windows\include\blaze\math\typetraits\issimdenabled.h(77): note: see reference to class template instantiation 'blaze::GetSIMDEnabled<T,Args...>' being compiled
1>e:\vcpkg\installed\x64-windows\include\blaze\math\views\check.h(138): note: see reference to class template instantiation 'blaze::Check<false>' being compiled
1>e:\vcpkg\installed\x64-windows\include\blaze\math\views\check.h(121): note: see reference to class template instantiation 'blaze::Check<true>' being compiled
1>e:\vcpkg\installed\x64-windows\include\blaze\math\typetraits\issimdenabled.h(76): error C2059: syntax error: ')'
1>e:\vcpkg\installed\x64-windows\include\blaze\util\time.h(92): error C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt\time.h(505): note: see declaration of 'localtime'
1>e:\vcpkg\installed\x64-windows\include\blaze\util\time.h(113): error C4996: 'localtime': This function or variable may be unsafe. Consider using localtime_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt\time.h(505): note: see declaration of 'localtime'
1>e:\vcpkg\installed\x64-windows\include\blaze\util\time.h(131): error C4996: '_ftime64': This function or variable may be unsafe. Consider using _ftime64_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>c:\program files (x86)\windows kits\10\include\10.0.16299.0\ucrt\sys\timeb.h(76): note: see declaration of '_ftime64'
1>Done building project "Project1.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I wasn't sure this is a blaze bug, but since I pretty much followed the install instructions literally I thought this might be the best place to ask.

Comments (8)

  1. Klaus Iglberger

    Hi Frank!

    In order to be able to help I need the information which version of Visual Studio you are using. Since the error message suggests an MSVC problem and since Blaze is continuously tested for MSVC, there is a high probability that the version of MSVC is too old, some flags are missing, or something similar. Thanks,

    Best regards,

    Klaus!

  2. Frank Drop reporter

    Hi Klaus,

    thanks for the quick reply. I'm sorry for not including this immediately.

    Visual Studio version info:

    Microsoft Visual Studio Community 2017 
    Version 15.9.8
    VisualStudio.15.Release/15.9.8+28307.481
    Microsoft .NET Framework
    Version 4.7.03056
    
    Installed Version: Community
    
    Visual C++ 2017   00369-60000-00001-AA621
    Microsoft Visual C++ 2017
    
    C# Tools   2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
    C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
    
    JavaScript Language Service   2.0
    JavaScript Language Service
    
    Microsoft JVM Debugger   1.0
    Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
    
    Microsoft MI-Based Debugger   1.0
    Provides support for connecting Visual Studio to MI compatible debuggers
    
    Microsoft Visual C++ Wizards   1.0
    Microsoft Visual C++ Wizards
    
    Microsoft Visual Studio VC Package   1.0
    Microsoft Visual Studio VC Package
    
    NuGet Package Manager   4.6.0
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
    
    ProjectServicesPackage Extension   1.0
    ProjectServicesPackage Visual Studio Extension Detailed Info
    
    Visual Basic Tools   2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
    Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
    
    Visual Studio Code Debug Adapter Host Package   1.0
    Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
    
    Visual Studio Tools for Unity   3.9.0.3
    Visual Studio Tools for Unity
    
  3. Klaus Iglberger

    Hi Frank!

    Thanks for the information. Which compiler flags do you use? And could you please provide a minimum example (in case this doesn't just happen when you include <blaze/Blaze.h>)?

    Best regards,

    Klaus!

  4. Frank Drop reporter

    The detailed build output from MSVC:

    1>------ Up-To-Date check: Project: Project1, Configuration: Debug x64 ------
    1>Project is not up-to-date: last build was unsuccessful.
    1>------ Build started: Project: Project1, Configuration: Debug x64 ------
    1>Build started 11/03/2019 10:49:05.
    1>Building with tools version "15.0".
    1>Target "EnableIntermediateOutputPathMismatchWarning" skipped, due to false condition; ('$(RestoreProjectStyle)' == 'PackageReference') was evaluated as ('' == 'PackageReference').
    1>Target _CheckForInvalidConfigurationAndPlatform:
    1>  Task "Error" skipped, due to false condition; ( '$(_InvalidConfigurationError)' == 'true' ) was evaluated as ( '' == 'true' ).
    1>  Task "Warning" skipped, due to false condition; ( '$(_InvalidConfigurationWarning)' == 'true' ) was evaluated as ( '' == 'true' ).
    1>  Using "Message" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    1>  Task "Message"
    1>    Configuration=Debug
    1>  Done executing task "Message".
    1>  Task "Message"
    1>    Platform=x64
    1>  Done executing task "Message".
    1>  Task "Error" skipped, due to false condition; ('$(OutDir)' != '' and !HasTrailingSlash('$(OutDir)')) was evaluated as ('E:\projects\blaze_msvc\blaze_test\x64\Debug\' != '' and !HasTrailingSlash('E:\projects\blaze_msvc\blaze_test\x64\Debug\')).
    1>  Task "Error" skipped, due to false condition; ('$(BaseIntermediateOutputPath)' != '' and !HasTrailingSlash('$(BaseIntermediateOutputPath)')) was evaluated as ('obj\' != '' and !HasTrailingSlash('obj\')).
    1>  Task "Error" skipped, due to false condition; ('$(IntermediateOutputPath)' != '' and !HasTrailingSlash('$(IntermediateOutputPath)')) was evaluated as ('x64\Debug\' != '' and !HasTrailingSlash('x64\Debug\')).
    1>  Task "Error" skipped, due to false condition; ( '$(_InitialMSBuildProjectExtensionsPath)' != '' And '$(MSBuildProjectExtensionsPath)' != '$(_InitialMSBuildProjectExtensionsPath)' ) was evaluated as ( 'E:\projects\blaze_msvc\blaze_test\Project1\obj\' != '' And 'E:\projects\blaze_msvc\blaze_test\Project1\obj\' != 'E:\projects\blaze_msvc\blaze_test\Project1\obj\' ).
    1>  Task "Warning" skipped, due to false condition; ( '$(EnableBaseIntermediateOutputPathMismatchWarning)' == 'true' And '$(_InitialBaseIntermediateOutputPath)' != '$(BaseIntermediateOutputPath)' And '$(BaseIntermediateOutputPath)' != '$(MSBuildProjectExtensionsPath)' ) was evaluated as ( '' == 'true' And 'obj\' != 'obj\' And 'obj\' != 'E:\projects\blaze_msvc\blaze_test\Project1\obj\' ).
    1>Target "_CheckForInvalidConfigurationAndPlatform" skipped. Previously built successfully.
    1>Target SetTelemetryEnvironmentVariables:
    1>  Using "SetEnv" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Build.CppTasks.Common.dll".
    1>  Task "SetEnv"
    1>    VSTEL_SolutionSessionID={FF8C3B87-1B2A-4A1E-A76B-38713F0A13AA}
    1>  Done executing task "SetEnv".
    1>  Task "SetEnv"
    1>    VSTEL_CurrentSolutionBuildID=50730312
    1>  Done executing task "SetEnv".
    1>  Task "SetEnv"
    1>    VSTEL_ProjectID={9CE2B2B0-2B0E-4AD7-B200-540DEBBA93C3}
    1>  Done executing task "SetEnv".
    1>Target _PrepareForBuild:
    1>  Task "CreateItem" skipped, due to false condition; ('%(CustomBuild.IncludeFileToTool)'!='') was evaluated as (''!='').
    1>Target _PrepareForReferenceResolution:
    1>  Task "Message" skipped, due to false condition; ('$(_REFERENCE_DEBUG)'=='true') was evaluated as (''=='true').
    1>Target "ComputeCrtSDKReference" skipped, due to false condition; ('@(ClCompile)'!='' and '$(WindowsAppContainer)'=='true' and '$(UseCrtSDKReference)' != 'false') was evaluated as ('blaze_test.cpp'!='' and 'false'=='true' and '' != 'false').
    1>Target BeforeResolveReferences:
    1>Target AssignProjectConfiguration:
    1>  Using "AssignProjectConfiguration" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    1>  Task "AssignProjectConfiguration"
    1>  Done executing task "AssignProjectConfiguration".
    1>Target "AssignProjectConfiguration" skipped. Previously built successfully.
    1>Target _SplitProjectReferencesByFileExistence:
    1>  Task "ResolveNonMSBuildProjectOutput" skipped, due to false condition; ('$(BuildingInsideVisualStudio)'=='true' and '@(ProjectReferenceWithConfiguration)'!='') was evaluated as ('true'=='true' and ''!='').
    1>Target _GetProjectReferenceTargetFrameworkProperties:
    1>  Using "MSBuild" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    1>  Task "MSBuild"
    1>  Done executing task "MSBuild".
    1>  Task "GetReferenceNearestTargetFrameworkTask" skipped, due to false condition; ('@(_ProjectReferenceTargetFrameworkPossibilities->Count())' != '0' and '$(ReferringTargetFrameworkForProjectReferences)' != '') was evaluated as ('0' != '0' and '.NETFramework,Version=v4.0' != '').
    1>Target PrepareProjectReferences:
    1>Target "_RemoveNameMetadataFromProjectReferenceItems" skipped, due to false condition; ('@(ProjectReference)'!='') was evaluated as (''!='').
    1>Target ResolveProjectReferences:
    1>  Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' != '10.0' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('' == 'true' and '' != '' and ('true' == 'true' or 'true' != 'true') and '15.0' != '10.0' and '' != '').
    1>  Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and ('$(BuildingInsideVisualStudio)' == 'true' or '$(BuildProjectReferences)' != 'true') and '$(VisualStudioVersion)' == '10.0' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('' == 'true' and '' != '' and ('true' == 'true' or 'true' != 'true') and '15.0' == '10.0' and '' != '').
    1>  Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingInsideVisualStudio)' != 'true' and '$(BuildProjectReferences)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('' == 'true' and '' != '' and 'true' != 'true' and 'true' == 'true' and '' != '').
    1>  Task "MSBuild" skipped, due to false condition; ('%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '$(BuildingProject)' == 'true' and '@(_MSBuildProjectReferenceExistent)' != '') was evaluated as ('' == 'true' and '' != '' and 'true' == 'true' and '' != '').
    1>  Task "Warning" skipped, due to false condition; ('@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceNonexistent)' != '') was evaluated as ('' != '' and '' != '').
    1>Target "FindInvalidProjectReferences" skipped, due to false condition; ('$(FindInvalidProjectReferences)' == 'true') was evaluated as ('' == 'true').
    1>Target "ResolveNativeReferences" skipped, due to false condition; ('@(NativeReference)'!='') was evaluated as (''!='').
    1>Target "_PrepareForReferenceResolution" skipped. Previously built successfully.
    1>Target "ResolveProjectReferences" skipped. Previously built successfully.
    1>Target "FindInvalidProjectReferences" skipped, due to false condition; ('$(FindInvalidProjectReferences)' == 'true') was evaluated as ('' == 'true').
    1>Target GetFrameworkPaths:
    1>Target "_PrepareForReferenceResolution" skipped. Previously built successfully.
    1>Target "GetWinFXPath" skipped, due to false condition; (('@(Page)' != '' or '@(ApplicationDefinition)' != '' or '@(Resource)' != '') and ('$(GetWinFXNativePath)' != '' or '$(GetWinFXWoWPath)' != '' )) was evaluated as (('' != '' or '' != '' or '' != '') and ('' != '' or '' != '' )).
    1>Target "GetFrameworkPaths" skipped. Previously built successfully.
    1>Target GetReferenceAssemblyPaths:
    1>  Task "GetReferenceAssemblyPaths" skipped, due to false condition; ('$(TargetFrameworkMoniker)' != '' and ('$(_TargetFrameworkDirectories)' == '' or '$(_FullFrameworkReferenceAssemblyPaths)' == '')) was evaluated as ('' != '' and ('C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0' == '' or 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0' == '')).
    1>Target SetBuildDefaultEnvironmentVariables:
    1>  Task "SetEnv"
    1>    PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86;C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x86;;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\tools;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\ide;C:\Program Files (x86)\HTML Help Workshop;;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin;C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\;;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;E:\MATLAB\runtime\win64;E:\MATLAB\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files\boost-build\bin;C:\Program Files\CMake\bin;C:\Program Files (x86)\mingw-w64\i686-7.3.0-posix-dwarf-rt_v5-rev0\mingw32\bin;C:\Users\Frank Drop\AppData\Local\Microsoft\WindowsApps;C:\Users\Frank Drop\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Frank Drop\.dotnet\tools;E:\protoc\bin;;
    1>  Done executing task "SetEnv".
    1>  Task "SetEnv"
    1>    LIB=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64;;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\atlmfc\lib\x64;;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\VS\lib\x64;;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\ucrt\x64;;;C:\Program Files (x86)\Windows Kits\10\lib\10.0.16299.0\um\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64;;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\Lib\um\x64
    1>  Done executing task "SetEnv".
    1>  Task "SetEnv"
    1>    LIBPATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\atlmfc\lib\x64;;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x64;
    1>  Done executing task "SetEnv".
    1>  Task "SetEnv"
    1>    INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include;;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\atlmfc\include;;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\VS\include;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\Include\um;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\Include\um;
    1>  Done executing task "SetEnv".
    1>Target "SetUserMacroEnvironmentVariables" skipped, due to false condition; ('@(BuildMacro)' != '' and '$(DesignTimeBuild)' != 'true') was evaluated as ('' != '' and '' != 'true').
    1>Target "_PrepareForReferenceResolution" skipped. Previously built successfully.
    1>Target GetResolvedWinMD:
    1>Target PlatformPrepareForBuild:
    1>  Task "VCMessage" skipped, due to false condition; ('$(_Error64bitToolsNotInstalled)' == 'true') was evaluated as ('' == 'true').
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(_ToolsetFound)' != 'true' and '$(PlatformToolset)' == '') was evaluated as (''!='true' and 'true' != 'true' and 'v141' == '').
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(_ToolsetFound)' != 'true' and '$(PlatformToolset)' == 'v110') was evaluated as (''!='true' and 'true' != 'true' and 'v141' == 'v110').
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(_ToolsetFound)' != 'true' and '$(PlatformToolset)' == 'v100') was evaluated as (''!='true' and 'true' != 'true' and 'v141' == 'v100').
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(_ToolsetFound)' != 'true' and '$(PlatformToolset)' == 'v90') was evaluated as (''!='true' and 'true' != 'true' and 'v141' == 'v90').
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(_ToolsetFound)' != 'true' and '$(PlatformToolset)' != 'v90' and '$(PlatformToolset)' != 'v100' and '$(PlatformToolset)' != 'v110') was evaluated as (''!='true' and 'true' != 'true' and 'v141' != 'v90' and 'v141' != 'v100' and 'v141' != 'v110').
    1>Target _CheckWindowsSDKInstalled:
    1>  Task "VCMessage" skipped, due to false condition; ('$(WindowsSDKInstalled)' != 'true') was evaluated as ('true' != 'true').
    1>  Task "VCMessage" skipped, due to false condition; ('$(WindowsAppContainer)' != 'true' and '$(WindowsSDK_Desktop_Support)' != true) was evaluated as ('false' != 'true' and 'true' != true).
    1>Target "GetFrameworkPaths" skipped. Previously built successfully.
    1>Target "GetReferenceAssemblyPaths" skipped. Previously built successfully.
    1>Target "AssignLinkMetadata" skipped, due to false condition; ( '$(SynthesizeLinkMetadata)' == 'true' ) was evaluated as ( '' == 'true' ).
    1>Target SetCABuildNativeEnvironmentVariables:
    1>  Task "SetEnv"
    1>    CAExcludePath=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt;;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\shared;C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\Include\um;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\Include\um;
    1>  Done executing task "SetEnv".
    1>Target PrepareForBuild:
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)' != 'true' and '$(ConfigurationPlatformExists)' != 'true') was evaluated as ('' != 'true' and 'true' != 'true').
    1>  Using "MakeDir" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    1>  Task "MakeDir"
    1>  Done executing task "MakeDir".
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(WindowsAppContainer)'=='true' and '$(ConfigurationType)'!='Application' and '$(ConfigurationType)'!='DynamicLibrary' and '$(ConfigurationType)'!='StaticLibrary') was evaluated as (''!='true' and 'false'=='true' and 'Application'!='Application' and 'Application'!='DynamicLibrary' and 'Application'!='StaticLibrary').
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(VCToolsInstallDir)'=='' and '$(UseEnv)' != 'true' and ('$(TargetFrameworkVersion)'=='v3.5' or '$(TargetFrameworkVersion)'=='v3.0' or '$(TargetFrameworkVersion)'=='v2.0' )) was evaluated as (''!='true' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\'=='' and '' != 'true' and ('v4.0'=='v3.5' or 'v4.0'=='v3.0' or 'v4.0'=='v2.0' )).
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(VCToolsInstallDir)'=='' and '$(UseEnv)' != 'true' and '$(PlatformToolset)'=='v90') was evaluated as (''!='true' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\'=='' and '' != 'true' and 'v141'=='v90').
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(VCToolsInstallDir)'=='' and '$(UseEnv)' != 'true') was evaluated as (''!='true' and 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\'=='' and '' != 'true').
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(WindowsSDKDir)'=='' and '$(UseEnv)' != 'true') was evaluated as (''!='true' and 'C:\Program Files (x86)\Windows Kits\10\'=='' and '' != 'true').
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(IntDirTrailingSlashWarning)'=='true') was evaluated as (''!='true' and ''=='true').
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(OutDirTrailingSlashWarning)'=='true') was evaluated as (''!='true' and ''=='true').
    1>  Task "VCMessage" skipped, due to false condition; ('%(CompatibilityIssues.Identity)' != '' and '$(DesignTimeBuild)'!='true') was evaluated as ('' != '' and ''!='true').
    1>  Task "VCMessage" skipped, due to false condition; ('$(IgnoreWarnIntDirSharingDetected)' != 'true' and '$(IntDirSharingDetected)' == 'true') was evaluated as ('' != 'true' and '' == 'true').
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)'!='true' and '$(IgnoreWarnIntDirInTempDetected)' != 'true' and ('$(_IntDirFullpath.StartsWith($(Tmp), true, null))' == 'true' or '$(_IntDirFullpath.StartsWith($(Temp), true, null))' == 'true' or '$(_OutDirFullpath.StartsWith($(Tmp), true, null))' == 'true' or '$(_OutDirFullpath.StartsWith($(Temp), true, null))' == 'true')) was evaluated as (''!='true' and '' != 'true' and ('False' == 'true' or 'False' == 'true' or 'False' == 'true' or 'False' == 'true')).
    1>  Task "VCMessage" skipped, due to false condition; ('$(DesignTimeBuild)' != 'true' and '$(SpectreMitigation)' != '' and '$(SpectreMitigation)' != 'false' and (('$(_VC_Target_Library_Platform)' == 'OneCore' and !Exists('$(VC_LibraryPath_VC_x86_OneCore)')) or ('$(_VC_Target_Library_Platform)' == 'Desktop' and !Exists('$(VC_LibraryPath_VC_x86_Desktop)')))) was evaluated as ('' != 'true' and 'false' != '' and 'false' != 'false' and (('Desktop' == 'OneCore' and !Exists('C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\onecore\x86')) or ('Desktop' == 'Desktop' and !Exists('C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\lib\x86')))).
    1>  Task "MakeDir"
    1>  Done executing task "MakeDir".
    1>Target "_PrepareForReferenceResolution" skipped. Previously built successfully.
    1>Target "ComputeCrtSDKReference" skipped, due to false condition; ('@(ClCompile)'!='' and '$(WindowsAppContainer)'=='true' and '$(UseCrtSDKReference)' != 'false') was evaluated as ('blaze_test.cpp'!='' and 'false'=='true' and '' != 'false').
    1>Target "GetInstalledSDKLocations" skipped, due to false condition; ('@(SDKReference)' != '') was evaluated as ('' != '').
    1>Target ResolveSDKReferences:
    1>  Task "ResolveSDKReference" skipped, due to false condition; ('@(SDKReference)'!='') was evaluated as (''!='').
    1>Target "ResolveSDKReferences" skipped. Previously built successfully.
    1>Target ExpandSDKReferences:
    1>  Task "GetSDKReferenceFiles" skipped, due to false condition; ('@(ResolvedSDKReference)'!='') was evaluated as (''!='').
    1>Target "ResolveNuGetPackageAssets" skipped, due to false condition; ('$(ResolveNuGetPackages)' == 'true' and exists('$(ProjectLockFile)')) was evaluated as ('true' == 'true' and exists('obj\project.assets.json')).
    1>Target ResolveAssemblyReferences:
    1>  Task "ResolveAssemblyReference" skipped, due to false condition; ('@(Reference)'!='' or '@(_ResolvedProjectReferencePaths)'!='' or '@(_ExplicitReference)' != '') was evaluated as (''!='' or ''!='' or '' != '').
    1>Target "GenerateBindingRedirects" skipped, due to false condition; ('$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true') was evaluated as ('' == 'true' and 'true' == 'true').
    1>Target "GenerateBindingRedirectsUpdateAppConfig" skipped, due to false condition; ('$(AutoGenerateBindingRedirects)' == 'true' and '$(GenerateBindingRedirectsOutputType)' == 'true' and Exists('$(_GenerateBindingRedirectsIntermediateAppConfig)')) was evaluated as ('' == 'true' and 'true' == 'true' and Exists('x64\Debug\Project1.exe.config')).
    1>Target "ResolveComReferences" skipped, due to false condition; ('@(COMReference)'!='' or '@(COMFileReference)'!='') was evaluated as (''!='' or ''!='').
    1>Target AfterResolveReferences:
    1>Target "ImplicitlyExpandDesignTimeFacades" skipped, due to false condition; ('$(ImplicitlyExpandDesignTimeFacades)' == 'true') was evaluated as ('' == 'true').
    1>Target "ResolveTestReferences" skipped, due to false condition; ('@(Shadow)'!='') was evaluated as (''!='').
    1>Target ResolveReferences:
    1>Target "PrepareForBuild" skipped. Previously built successfully.
    1>Target "PrepareForBuild" skipped. Previously built successfully.
    1>Target InitializeBuildStatus:
    1>  Using "ReadLinesFromFile" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    1>  Task "ReadLinesFromFile"
    1>  Done executing task "ReadLinesFromFile".
    1>  Using "WriteLinesToFile" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    1>  Task "WriteLinesToFile"
    1>  Done executing task "WriteLinesToFile".
    1>  Using "Touch" task from assembly "Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    1>  Task "Touch"
    1>    Touching "x64\Debug\Project1.tlog\unsuccessfulbuild".
    1>  Done executing task "Touch".
    1>Target "PrepareProjectReferences" skipped. Previously built successfully.
    1>Target BuildGenerateSourcesTraverse:
    1>  Task "MSBuild" skipped, due to false condition; ('$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != '' and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true') was evaluated as ('' == 'true' and '' != '' and '' != '' and '' == 'true').
    1>Target "PrepareForBuild" skipped. Previously built successfully.
    1>Target "ResolveReferences" skipped. Previously built successfully.
    1>Target BeforeBuildGenerateSources:
    1>Target PreBuildEvent:
    1>  Task "Message" skipped, due to false condition; ('%(PreBuildEvent.Message)' != '' and '%(PreBuildEvent.Command)' != '') was evaluated as ('' != '' and '' != '').
    1>  Task "Exec" skipped, due to false condition; ('%(PreBuildEvent.Command)' != '') was evaluated as ('' != '').
    1>Target "CustomBuild" skipped, due to false condition; ('@(CustomBuild)' != '') was evaluated as ('' != '').
    1>Target "FxExport" skipped, due to false condition; ('@(FxCompile)' != '') was evaluated as ('' != '').
    1>Target "FxCompile" skipped, due to false condition; ('@(FxCompile)' != '') was evaluated as ('' != '').
    1>Target "_CreateCopyFileItems" skipped, due to false condition; ('@(CopyFileToFolders)' != '') was evaluated as ('' != '').
    1>Target "PrepareForBuild" skipped. Previously built successfully.
    1>Target "InitializeBuildStatus" skipped. Previously built successfully.
    1>Target "SetBuildDefaultEnvironmentVariables" skipped. Previously built successfully.
    1>Target "SetUserMacroEnvironmentVariables" skipped, due to false condition; ('@(BuildMacro)' != '' and '$(DesignTimeBuild)' != 'true') was evaluated as ('' != '' and '' != 'true').
    1>Target _SelectedFiles:
    1>Target CopyFileToFolders:
    1>  Using "GetOutOfDateItems" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Build.CppTasks.Common.dll".
    1>  Task "GetOutOfDateItems"
    1>  Done executing task "GetOutOfDateItems".
    1>  Task "Copy" skipped, due to false condition; ('@(_OutOfDateCopyFile)' != '') was evaluated as ('' != '').
    1>Target "Xsd" skipped, due to false condition; ('@(Xsd)' != '') was evaluated as ('' != '').
    1>Target _Xsd:
    1>Target MakeDirsForMidl:
    1>  Task "Makedir"
    1>  Done executing task "Makedir".
    1>Target "Midl" skipped, due to false condition; ('@(Midl)' != '') was evaluated as ('' != '').
    1>Target "CustomBuild" skipped, due to false condition; ('@(CustomBuild)' != '') was evaluated as ('' != '').
    1>Target "FxExport" skipped, due to false condition; ('@(FxCompile)' != '') was evaluated as ('' != '').
    1>Target "FxCompile" skipped, due to false condition; ('@(FxCompile)' != '') was evaluated as ('' != '').
    1>Target ComputeMIDLGeneratedCompileInputs:
    1>Target AfterMidl:
    1>Target _Midl:
    1>Target AfterBuildGenerateSources:
    1>Target AfterBuildGenerateSourcesEvent:
    1>Target _BuildGenerateSourcesAction:
    1>Target BuildGenerateSources:
    1>Target "PrepareProjectReferences" skipped. Previously built successfully.
    1>Target BuildCompileTraverse:
    1>  Task "MSBuild" skipped, due to false condition; ('$(BuildPassReferences)' == 'true' and '@(ProjectReferenceWithConfiguration)' != '' and '@(_MSBuildProjectReferenceExistent)' != ''  and '%(_MSBuildProjectReferenceExistent.BuildReference)' == 'true') was evaluated as ('' == 'true' and '' != '' and '' != ''  and '' == 'true').
    1>Target "PrepareForBuild" skipped. Previously built successfully.
    1>Target "ResolveReferences" skipped. Previously built successfully.
    1>Target BeforeClCompile:
    1>Target "ComputeMIDLGeneratedCompileInputs" skipped. Previously built successfully.
    1>Target ComputeCLInputPDBName:
    1>Target "ResolveReferences" skipped. Previously built successfully.
    1>Target ComputeReferenceCLInput:
    1>  Task "WriteLinesToFile" skipped, due to false condition; (('@(_ReferenceCopyLocalPaths)'!='') and '$(DesignTimeBuild)' != 'true') was evaluated as ((''!='') and '' != 'true').
    1>  Task "Message" skipped, due to false condition; ('$(_REFERENCE_DEBUG)'=='true') was evaluated as (''=='true').
    1>Target WarnCompileDuplicatedFilename:
    1>  Task "VCMessage" skipped, due to false condition; ('%(ClCompile.ExcludedFromBuild)' != 'true' and '%(Filename)%(Extension)' != '@(ClCompile->'%(Filename)%(Extension)')' and '%(ObjectFileName)' == '@(ClCompile->Metadata(ObjectFileName)->Distinct())') was evaluated as ('' != 'true' and 'blaze_test.cpp' != 'blaze_test.cpp' and 'x64\Debug\' == 'x64\Debug\').
    1>Target FixupCLCompileOptions:
    1>Target MakeDirsForCl:
    1>  Task "MakeDir"
    1>  Done executing task "MakeDir".
    1>Target "_SelectedFiles" skipped. Previously built successfully.
    1>Target "ComputeMIDLGeneratedCompileInputs" skipped. Previously built successfully.
    1>Target "ComputeCLInputPDBName" skipped. Previously built successfully.
    1>Target "ComputeReferenceCLInput" skipped. Previously built successfully.
    1>Target "WarnCompileDuplicatedFilename" skipped. Previously built successfully.
    1>Target "FixupCLCompileOptions" skipped. Previously built successfully.
    1>Target "_SelectedFiles" skipped. Previously built successfully.
    1>Target SelectCustomBuild:
    1>Target SelectClCompile:
    1>Target "GenerateTargetFrameworkMonikerAttribute" skipped, due to false condition; ('$(GenerateTargetFrameworkAttribute)' == 'true') was evaluated as ('false' == 'true').
    1>Target "ManagedIncrementalBuildPreProcessDependencyGraph" skipped, due to false condition; ('@(ClCompile)' != '' and '$(EnableManagedIncrementalBuild)' == 'True') was evaluated as ('blaze_test.cpp' != '' and 'false' == 'True').
    1>Target ClCompile:
    1>  Task "Delete" skipped, due to false condition; ('%(ClCompile.DebugInformationFormat)' != '' and '%(ClCompile.DebugInformationFormat)' != 'None' and '%(ClCompile.DebugInformationFormat)' != 'OldStyle' and '%(ClCompile.ProgramDataBaseFileName)' != '' and !Exists(%(ClCompile.ProgramDataBaseFileName))) was evaluated as ('EditAndContinue' != '' and 'EditAndContinue' != 'None' and 'EditAndContinue' != 'OldStyle' and 'x64\Debug\vc141.pdb' != '' and !Exists(x64\Debug\vc141.pdb)).
    1>  Task "CL" skipped, due to false condition; ('%(ClCompile.PrecompiledHeader)' == 'Create' and '%(ClCompile.ExcludedFromBuild)'!='true' and '%(ClCompile.CompilerIteration)' == '') was evaluated as ('NotUsing' == 'Create' and ''!='true' and '' == '').
    1>  Using "CL" task from assembly "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Build.CppTasks.Common.dll".
    1>  Task "CL"
    1>    Outputs for E:\PROJECTS\BLAZE_MSVC\BLAZE_TEST\PROJECT1\BLAZE_TEST.CPP:
    1>      E:\PROJECTS\BLAZE_MSVC\BLAZE_TEST\PROJECT1\X64\DEBUG\BLAZE_TEST.OBJ
    1>    blaze_test.cpp will be compiled because the tracking log is not available.
    1>    Write Tracking log not available, minimal rebuild will be disabled.
    1>    Environment Variables passed to tool:
    1>      VS_UNICODE_OUTPUT=1404
    1>    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\CL.exe /c /IE:\projects\blaze /ZI /JMC /nologo /W3 /WX- /diagnostics:classic /sdl /Od /D _CRT_SECURE_NO_WARNINGS /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /permissive- /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"x64\Debug\\" /Fd"x64\Debug\vc141.pdb" /Gd /TP /FC /errorReport:prompt blaze_test.cpp
    1>    Tracking command:
    1>    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\Tracker.exe /d "C:\Program Files (x86)\MSBuild\15.0\FileTracker\FileTracker32.dll" /i E:\projects\blaze_msvc\blaze_test\Project1\x64\Debug\Project1.tlog /r E:\PROJECTS\BLAZE_MSVC\BLAZE_TEST\PROJECT1\BLAZE_TEST.CPP /b MSBuildConsole_CancelEvent22b5f8c1ee654bd4b19b17cf3df9444f  /c "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\CL.exe"  /c /IE:\projects\blaze /ZI /JMC /nologo /W3 /WX- /diagnostics:classic /sdl /Od /D _CRT_SECURE_NO_WARNINGS /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /permissive- /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"x64\Debug\\" /Fd"x64\Debug\vc141.pdb" /Gd /TP /FC /errorReport:prompt blaze_test.cpp
    1>    blaze_test.cpp
    1>    e:\projects\blaze\blaze\math\typetraits\issimdenabled.h(76): error C2760: syntax error: unexpected token '>', expected ')'
    1>    e:\projects\blaze\blaze\math\typetraits\issimdenabled.h(77): note: see reference to class template instantiation 'blaze::GetSIMDEnabled<T,Args...>' being compiled
    1>    e:\projects\blaze\blaze\math\views\check.h(138): note: see reference to class template instantiation 'blaze::Check<false>' being compiled
    1>    e:\projects\blaze\blaze\math\views\check.h(121): note: see reference to class template instantiation 'blaze::Check<true>' being compiled
    1>    e:\projects\blaze\blaze\math\typetraits\issimdenabled.h(76): error C2059: syntax error: ')'
    1>    The command exited with code 2.
    1>  Done executing task "CL" -- FAILED.
    1>Done building target "ClCompile" in project "Project1.vcxproj" -- FAILED.
    1>
    1>Done building project "Project1.vcxproj" -- FAILED.
    1>
    1>Build FAILED.
    1>
    1>e:\projects\blaze\blaze\math\typetraits\issimdenabled.h(76): error C2760: syntax error: unexpected token '>', expected ')'
    1>e:\projects\blaze\blaze\math\typetraits\issimdenabled.h(76): error C2059: syntax error: ')'
    1>    0 Warning(s)
    1>    2 Error(s)
    1>
    1>Time Elapsed 00:00:05.73
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    
  5. Klaus Iglberger

    Hi Frank!

    I tried to reproduce the error, but although I'm using the exact same version of Visual Studio 2017 all tests compile flawlessly. Still, I have an idea of what could potentially cause the problem: MSVC always had problems with the template keyword to disambiguate the use of nested templates. The line in question contains such a use of a nested template. Therefore I have pushed commit f7fc598 as an attempt to resolve the problem. Could you please do me the favor to check if this change resolves the issue on your system (either via cloning from the repository or if that is not possible by manually editing <blaze/math/typetraits/IsSIMDEnabled.h>)? I appreciate the help, thanks a lot,

    Best regards,

    Klaus!

  6. Frank Drop reporter

    Great, that has fixed it.

    Thank you very much.

    In the meantime I also tried compiling with MinGW and ran into a little problem there as well, I'll make another issue.

  7. Klaus Iglberger

    Commit f7fc598 resolves the MSVC compilation issue with the Blaze 3.5 installation from vcpkg. The fix is immediately available via cloning the Blaze repository and will be officially released in Blaze 3.6.

  8. Log in to comment