stevenlovegrove / Pangolin

Pangolin is a lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input.
MIT License
2.33k stars 844 forks source link

Windows Visual Studio 2019 Build Errors #654

Closed ScottMonaghan closed 3 years ago

ScottMonaghan commented 3 years ago

Hello I'm attempting to build on Windows 10 with Visual Studio 2019.

The build went along fine until it encountered this error, that eventually leads the whole build to fail. Any suggestions?

geometry.cpp
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C3546: '...': there are no parameter packs available to expand

Here is my full build output:

C:\Users\scott\Documents\GitHub\Pangolin\build>cmake --build .
[  1%] Performing update step for '__libjpeg'
[  2%] No patch step for '__libjpeg'
[  3%] Performing configure step for '__libjpeg'
CMake Deprecation Warning at CMakeLists.txt:8 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

DIST_NAME: libjpeg
DIST_VERSION: 8.4.0
DIST_LICENSE: jpeg license
DIST_AUTHOR: Tom Lane, Guido Vollbeding, Philip Gladstone, Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, Ge
DIST_MAINTAINER: Peter Kapec
DIST_URL: http://www.ijg.org/
DIST_DESC: Independent JPEG Group
DIST_DEPENDS:
CMake Warning (dev) at CMakeLists.txt:56 (get_target_property):
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The LOCATION property should not be read from target "djpeg".  Use the
  target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
  CMakeLists.txt:61 (mytest)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:56 (get_target_property):
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The LOCATION property should not be read from target "djpeg".  Use the
  target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
  CMakeLists.txt:63 (mytest)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:56 (get_target_property):
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The LOCATION property should not be read from target "cjpeg".  Use the
  target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
  CMakeLists.txt:65 (mytest)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:56 (get_target_property):
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The LOCATION property should not be read from target "djpeg".  Use the
  target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
  CMakeLists.txt:67 (mytest)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:56 (get_target_property):
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The LOCATION property should not be read from target "cjpeg".  Use the
  target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
  CMakeLists.txt:69 (mytest)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:56 (get_target_property):
  Policy CMP0026 is not set: Disallow use of the LOCATION target property.
  Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  The LOCATION property should not be read from target "jpegtran".  Use the
  target name directly with add_custom_command, or use the generator
  expression $<TARGET_FILE>, as appropriate.

Call Stack (most recent call first):
  CMakeLists.txt:71 (mytest)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/scott/Documents/GitHub/Pangolin/build/external/libjpeg/src/__libjpeg-build
[  3%] Performing build step for '__libjpeg'

Microsoft (R) Program Maintenance Utility Version 14.27.29111.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Consolidate compiler generated dependencies of target rdjpgcom
[  2%] Built target rdjpgcom
Consolidate compiler generated dependencies of target jpeg
[ 66%] Built target jpeg
Consolidate compiler generated dependencies of target wrjpgcom
[ 68%] Built target wrjpgcom
Consolidate compiler generated dependencies of target cjpeg
[ 81%] Built target cjpeg
Consolidate compiler generated dependencies of target djpeg
[ 93%] Built target djpeg
Consolidate compiler generated dependencies of target jpegtran
[100%] Built target jpegtran
[  4%] Performing install step for '__libjpeg'

Microsoft (R) Program Maintenance Utility Version 14.27.29111.0
Copyright (C) Microsoft Corporation.  All rights reserved.

[  2%] Built target rdjpgcom
[ 66%] Built target jpeg
[ 68%] Built target wrjpgcom
[ 81%] Built target cjpeg
[ 93%] Built target djpeg
[100%] Built target jpegtran
Install the project...
-- Install configuration: ""
-- Up-to-date: C:/Program Files (x86)/Pangolin/bin/cjpeg.exe
-- Up-to-date: C:/Program Files (x86)/Pangolin/bin/djpeg.exe
-- Up-to-date: C:/Program Files (x86)/Pangolin/bin/jpegtran.exe
-- Up-to-date: C:/Program Files (x86)/Pangolin/bin/rdjpgcom.exe
-- Up-to-date: C:/Program Files (x86)/Pangolin/bin/wrjpgcom.exe
-- Up-to-date: C:/Program Files (x86)/Pangolin/lib/jpeg.lib
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/jerror.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/jmorecfg.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/jpeglib.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/jconfig.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/libjpeg/doc/README
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/libjpeg/doc/install.txt
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/libjpeg/doc/usage.txt
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/libjpeg/doc/wizard.txt
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/libjpeg/doc/example.c
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/libjpeg/doc/libjpeg.txt
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/libjpeg/doc/structure.txt
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/libjpeg/doc/coderules.txt
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/libjpeg/doc/filelist.txt
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/libjpeg/doc/change.log
[  5%] Completed '__libjpeg'
[  6%] Built target __libjpeg
[  7%] Performing update step for '__glew'
[  7%] No patch step for '__glew'
[  7%] Performing configure step for '__glew'
CMake Deprecation Warning at CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/scott/Documents/GitHub/Pangolin/build/external/glew/src/__glew-build
[  8%] Performing build step for '__glew'

Microsoft (R) Program Maintenance Utility Version 14.27.29111.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Scanning dependencies of target libglew_static
Consolidate compiler generated dependencies of target libglew_static
[ 30%] Built target libglew_static
Consolidate compiler generated dependencies of target glewinfo
[ 50%] Built target glewinfo
Consolidate compiler generated dependencies of target visualinfo
[ 70%] Built target visualinfo
Scanning dependencies of target libglew_shared
Consolidate compiler generated dependencies of target libglew_shared
[100%] Built target libglew_shared
[  9%] Performing install step for '__glew'

Microsoft (R) Program Maintenance Utility Version 14.27.29111.0
Copyright (C) Microsoft Corporation.  All rights reserved.

[ 30%] Built target libglew_static
[ 50%] Built target glewinfo
[ 70%] Built target visualinfo
[100%] Built target libglew_shared
Install the project...
-- Install configuration: ""
-- Up-to-date: C:/Program Files (x86)/Pangolin/lib/glew.lib
-- Up-to-date: C:/Program Files (x86)/Pangolin/lib/libglew_shared.lib
-- Up-to-date: C:/Program Files (x86)/Pangolin/lib/glew.dll
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/GL/glew.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/GL/glxew.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/GL/wglew.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/bin/glewinfo.exe
-- Up-to-date: C:/Program Files (x86)/Pangolin/bin/visualinfo.exe
[ 10%] Completed '__glew'
[ 12%] Built target __glew
[ 12%] Performing update step for '__zlib'
HEAD is now at 5089329 zlib 1.2.8
[ 13%] No patch step for '__zlib'
[ 14%] Performing configure step for '__zlib'
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/scott/Documents/GitHub/Pangolin/build/external/zlib/src/__zlib-build
[ 15%] Performing build step for '__zlib'

Microsoft (R) Program Maintenance Utility Version 14.27.29111.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Scanning dependencies of target zlib
Consolidate compiler generated dependencies of target zlib
[ 45%] Built target zlib
Consolidate compiler generated dependencies of target zlibstatic
[ 89%] Built target zlibstatic
Consolidate compiler generated dependencies of target example
[ 94%] Built target example
Consolidate compiler generated dependencies of target minigzip
[100%] Built target minigzip
[ 15%] Performing install step for '__zlib'

Microsoft (R) Program Maintenance Utility Version 14.27.29111.0
Copyright (C) Microsoft Corporation.  All rights reserved.

[ 45%] Built target zlib
[ 89%] Built target zlibstatic
[ 94%] Built target example
[100%] Built target minigzip
Install the project...
-- Install configuration: ""
-- Up-to-date: C:/Program Files (x86)/Pangolin/lib/zlib.lib
-- Up-to-date: C:/Program Files (x86)/Pangolin/bin/zlib.dll
-- Up-to-date: C:/Program Files (x86)/Pangolin/lib/zlibstatic.lib
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/zconf.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/zlib.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/man/man3/zlib.3
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/pkgconfig/zlib.pc
[ 15%] Completed '__zlib'
[ 17%] Built target __zlib
[ 18%] Performing update step for '__libpng'
[ 19%] No patch step for '__libpng'
[ 20%] Performing configure step for '__libpng'
CMake Deprecation Warning at CMakeLists.txt:9 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/scott/Documents/GitHub/Pangolin/build/external/libpng/src/__libpng-build
[ 20%] Performing build step for '__libpng'

Microsoft (R) Program Maintenance Utility Version 14.27.29111.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Consolidate compiler generated dependencies of target png16
[ 42%] Built target png16
Consolidate compiler generated dependencies of target png16_static
[ 84%] Built target png16_static
Consolidate compiler generated dependencies of target pngtest
[ 89%] Built target pngtest
Consolidate compiler generated dependencies of target pngvalid
[ 94%] Built target pngvalid
Consolidate compiler generated dependencies of target pngstest
[100%] Built target pngstest
[ 20%] Performing install step for '__libpng'

Microsoft (R) Program Maintenance Utility Version 14.27.29111.0
Copyright (C) Microsoft Corporation.  All rights reserved.

[ 42%] Built target png16
[ 84%] Built target png16_static
[ 89%] Built target pngtest
[ 94%] Built target pngvalid
[100%] Built target pngstest
Install the project...
-- Install configuration: ""
-- Up-to-date: C:/Program Files (x86)/Pangolin/lib/libpng16.lib
-- Up-to-date: C:/Program Files (x86)/Pangolin/bin/libpng16.dll
-- Up-to-date: C:/Program Files (x86)/Pangolin/lib/libpng16_static.lib
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/png.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/pngconf.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/pnglibconf.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/libpng16/png.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/libpng16/pngconf.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/include/libpng16/pnglibconf.h
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/man/man3/libpng.3
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/man/man3/libpngpf.3
-- Up-to-date: C:/Program Files (x86)/Pangolin/share/man/man5/png.5
-- Up-to-date: C:/Program Files (x86)/Pangolin/lib/libpng/libpng16.cmake
-- Up-to-date: C:/Program Files (x86)/Pangolin/lib/libpng/libpng16-noconfig.cmake
[ 21%] Completed '__libpng'
[ 23%] Built target __libpng
Consolidate compiler generated dependencies of target pangolin
[ 24%] Building CXX object src/CMakeFiles/pangolin.dir/geometry/geometry.cpp.obj
geometry.cpp
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C3546: '...': there are no parameter packs available to expand
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(969): note: see reference to function template instantiation 'mpark::detail::Trait mpark::detail::common_trait<mpark::detail::Trait,mpark::detail::Trait,mpark::detail::Trait,mpark::detail::Trait>(mpark::detail::Trait,mpark::detail::Trait,mpark::detail::Trait,mpark::detail::Trait)' being compiled
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(1758): note: see reference to class template instantiation 'mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>' being compiled
        with
        [
            T=unsigned char
        ]
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(2057): note: see reference to class template instantiation 'mpark::detail::impl<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>' being compiled
        with
        [
            T=unsigned char
        ]
C:\Users\scott\Documents\GitHub\Pangolin\src\geometry\geometry.cpp(55): note: see reference to class template instantiation 'mpark::variant<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>' being compiled
        with
        [
            T=unsigned char
        ]
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C2955: 'mpark::detail::traits': use of class template requires template argument list
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(965): note: see declaration of 'mpark::detail::traits'
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C2119: '<range>$L0': the type for 'auto &&' cannot be deduced from an empty initializer
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C2672: 'begin': no matching overloaded function found
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C2893: Failed to specialize function template 'unknown-type std::begin(_Container &)'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xutility(2097): note: see declaration of 'std::begin'
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): note: With the following template arguments:
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): note: '_Container=int'
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C2784: 'const _Elem *std::begin(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\initializer_list(57): note: see declaration of 'std::begin'
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C2672: 'end': no matching overloaded function found
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C2893: Failed to specialize function template 'unknown-type std::end(_Container &)'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\xutility(2107): note: see declaration of 'std::end'
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): note: With the following template arguments:
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): note: '_Container=int'
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C2784: 'const _Elem *std::end(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\include\initializer_list(63): note: see declaration of 'std::end'
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C3536: '<begin>$L0': cannot be used before it is initialized
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C3536: '<end>$L0': cannot be used before it is initialized
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C2100: illegal indirection
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): error C2440: 'initializing': cannot convert from 'int' to 'mpark::detail::Trait'
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(967): error C2131: expression did not evaluate to a constant
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): note: a non-constant (sub-)expression was encountered
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(972): error C2131: expression did not evaluate to a constant
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): note: a non-constant (sub-)expression was encountered
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(977): error C2131: expression did not evaluate to a constant
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(977): note: failure was caused by a read of an uninitialized symbol
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(977): note: see usage of 'copy_constructible_trait'
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(983): error C2131: expression did not evaluate to a constant
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(983): note: failure was caused by a read of an uninitialized symbol
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(983): note: see usage of 'move_constructible_trait'
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(989): error C2131: expression did not evaluate to a constant
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(939): note: a non-constant (sub-)expression was encountered
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(1758): error C2976: 'mpark::detail::copy_assignment': too few template arguments
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(1721): note: see declaration of 'mpark::detail::copy_assignment'
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(1758): error C2504: 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>': base class undefined
        with
        [
            T=unsigned char
        ]
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(1762): error C2027: use of undefined type 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>'
        with
        [
            T=unsigned char
        ]
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(1758): note: see declaration of 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>'
        with
        [
            T=unsigned char
        ]
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(1762): error C3881: can only inherit constructor from direct base
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(1763): error C2027: use of undefined type 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>'
        with
        [
            T=unsigned char
        ]
C:\Users\scott\Documents\GitHub\Pangolin\include\mpark/variant.hpp(1758): note: see declaration of 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>'
        with
        [
            T=unsigned char
        ]
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
ScottMonaghan commented 3 years ago

I opened the Pangolin solution in Visual Studio 2019 and have the same errors if I try to build all.

If I build one-by-one the following all build successfully:

But if I try to build the pangolin project I get the following 95 errors:
Severity    Code    Description Project File    Line    Suppression State
Error   C3546   '...': there are no parameter packs available to expand pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2955   'mpark::detail::traits': use of class template requires template argument list  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2119   '<range>$L0': the type for 'auto &&' cannot be deduced from an empty initializer    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2672   'begin': no matching overloaded function found  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2893   Failed to specialize function template 'unknown-type std::begin(_Container &)'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2784   'const _Elem *std::begin(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2672   'end': no matching overloaded function found    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2893   Failed to specialize function template 'unknown-type std::end(_Container &)'    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2784   'const _Elem *std::end(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int'    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C3536   '<begin>$L0': cannot be used before it is initialized   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C3536   '<end>$L0': cannot be used before it is initialized pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2100   illegal indirection pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2440   'initializing': cannot convert from 'int' to 'mpark::detail::Trait' pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  967 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  972 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  977 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  983 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  989 
Error   C2976   'mpark::detail::copy_assignment': too few template arguments    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1758    
Error   C2504   'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>': base class undefined  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1758    
Error   C2027   use of undefined type 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1762    
Error   C3881   can only inherit constructor from direct base   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1762    
Error   C2027   use of undefined type 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1763    
Error   C3546   '...': there are no parameter packs available to expand pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2955   'mpark::detail::traits': use of class template requires template argument list  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2119   '<range>$L0': the type for 'auto &&' cannot be deduced from an empty initializer    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2672   'begin': no matching overloaded function found  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2893   Failed to specialize function template 'unknown-type std::begin(_Container &)'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2784   'const _Elem *std::begin(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2672   'end': no matching overloaded function found    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2893   Failed to specialize function template 'unknown-type std::end(_Container &)'    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2784   'const _Elem *std::end(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int'    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C3536   '<begin>$L0': cannot be used before it is initialized   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C3536   '<end>$L0': cannot be used before it is initialized pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2100   illegal indirection pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2440   'initializing': cannot convert from 'int' to 'mpark::detail::Trait' pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  967 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  972 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  977 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  983 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  989 
Error   C2976   'mpark::detail::copy_assignment': too few template arguments    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1758    
Error   C2504   'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>': base class undefined  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1758    
Error   C2027   use of undefined type 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1762    
Error   C3881   can only inherit constructor from direct base   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1762    
Error   C2027   use of undefined type 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1763    
Error   C3546   '...': there are no parameter packs available to expand pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2955   'mpark::detail::traits': use of class template requires template argument list  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2119   '<range>$L0': the type for 'auto &&' cannot be deduced from an empty initializer    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2672   'begin': no matching overloaded function found  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2893   Failed to specialize function template 'unknown-type std::begin(_Container &)'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2784   'const _Elem *std::begin(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2672   'end': no matching overloaded function found    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2893   Failed to specialize function template 'unknown-type std::end(_Container &)'    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2784   'const _Elem *std::end(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int'    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C3536   '<begin>$L0': cannot be used before it is initialized   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C3536   '<end>$L0': cannot be used before it is initialized pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2100   illegal indirection pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2440   'initializing': cannot convert from 'int' to 'mpark::detail::Trait' pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  967 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  972 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  977 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  983 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  989 
Error   C2976   'mpark::detail::copy_assignment': too few template arguments    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1758    
Error   C2504   'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>': base class undefined  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1758    
Error   C2027   use of undefined type 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1762    
Error   C3881   can only inherit constructor from direct base   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1762    
Error   C2027   use of undefined type 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1763    
Error   C3546   '...': there are no parameter packs available to expand pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2955   'mpark::detail::traits': use of class template requires template argument list  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2119   '<range>$L0': the type for 'auto &&' cannot be deduced from an empty initializer    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2672   'begin': no matching overloaded function found  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2893   Failed to specialize function template 'unknown-type std::begin(_Container &)'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2784   'const _Elem *std::begin(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2672   'end': no matching overloaded function found    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2893   Failed to specialize function template 'unknown-type std::end(_Container &)'    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2784   'const _Elem *std::end(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int'    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C3536   '<begin>$L0': cannot be used before it is initialized   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C3536   '<end>$L0': cannot be used before it is initialized pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2100   illegal indirection pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2440   'initializing': cannot convert from 'int' to 'mpark::detail::Trait' pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  939 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  967 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  972 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  977 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  983 
Error   C2131   expression did not evaluate to a constant   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  989 
Error   C2976   'mpark::detail::copy_assignment': too few template arguments    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1758    
Error   C2504   'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>': base class undefined  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1758    
Error   C2027   use of undefined type 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1762    
Error   C3881   can only inherit constructor from direct base   pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1762    
Error   C2027   use of undefined type 'mpark::detail::copy_assignment<mpark::detail::traits<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>,copy_assignable_trait>'  pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1763    
Error   C3861   'as_base': identifier not found pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1216    
Error   C2955   'mpark::detail::visitation::fmatrix': use of class template requires template argument list pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1216    
Error   C2039   'index': is not a member of 'mpark::detail::impl<pangolin::Image<float>,pangolin::Image<uint32_t>,pangolin::Image<uint16_t>,pangolin::Image<T>>'    pangolin    C:\Users\scott\Documents\GitHub\Pangolin\include\mpark\variant.hpp  1216    
kingcodefish commented 3 years ago

For a temporary fix, see https://github.com/stevenlovegrove/Pangolin/issues/609

stevenlovegrove commented 3 years ago

Thanks for this. I got rid of this Variant implementation and upgraded Pangolin to C++17. The master branch is now building well on Windows and you can see the status in the CI (https://github.com/stevenlovegrove/Pangolin/runs/3439133359) using Win10 and VS 2019. Let me know if you have any issues.

NancyLi1013 commented 3 years ago

Hi @stevenlovegrove

I'm vcpkg maintainer. When upgrading to the latest version v0.6, we also encountered this problem. Since master branch has been refactored, which has big differences from the latest release.

So for v0.6, Could you please hep confirm if the workaround which is from https://github.com/stevenlovegrove/Pangolin/issues/609#issuecomment-645653656 is reasonable?

Thanks in advance.

stevenlovegrove commented 3 years ago

@NancyLi1013 yes, that seems reasonable. Thanks for maintaining the vcpkg!