Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project build failed on windows10 vs2017 #4157

Closed
lexiaoyao12138 opened this issue Jun 2, 2024 · 1 comment
Closed

Project build failed on windows10 vs2017 #4157

lexiaoyao12138 opened this issue Jun 2, 2024 · 1 comment

Comments

@lexiaoyao12138
Copy link

After attempts, almost all versions fail to build the proj project on Windows 10 VS2017, with Windows SDK 10.0.*, specifically failing to compile defmodel.cpp.

捕获
this is compile defmodel.cpp

1>------ Build started: Project: proj, Configuration: Debug x64 ------
1>defmodel.cpp
1>C:\Users\dyz\Documents\vs2017_IDE\VC\Tools\MSVC\14.10.25017\include\type_traits(184): error C2672: 'std::declval': no matching overloaded function found
1>c:\users\dyz\documents\proj\proj-9.4.0\include\proj\internal\vendor/nlohmann/json.hpp(19615): note: see reference to class template instantiation 'std::add_rvalue_reference<proj_nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,proj_nlohmann::adl_serializer,std::vector<uint8_t,std::allocator<_Ty>>> &>' being compiled
1>        with
1>        [
1>            _Ty=uint8_t
1>        ]
1>C:\Users\dyz\Documents\vs2017_IDE\VC\Tools\MSVC\14.10.25017\include\type_traits(707): note: see reference to class template instantiation 'proj_nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,proj_nlohmann::adl_serializer,std::vector<uint8_t,std::allocator<_Ty>>>' being compiled
1>        with
1>        [
1>            _Ty=uint8_t
1>        ]
1>C:\Users\dyz\Documents\vs2017_IDE\VC\Tools\MSVC\14.10.25017\include\type_traits(736): note: see reference to class template instantiation 'std::is_nothrow_constructible<_Ty,proj_nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,proj_nlohmann::adl_serializer,std::vector<uint8_t,std::allocator<unsigned char>>> &&>' being compiled
1>        with
1>        [
1>            _Ty=proj_nlohmann::json
1>        ]
1>c:\users\dyz\documents\proj\proj-9.4.0\include\proj\internal\vendor/nlohmann/json.hpp(25228): note: see reference to class template instantiation 'std::is_nothrow_move_constructible<proj_nlohmann::json>' being compiled
1>C:\Users\dyz\Documents\vs2017_IDE\VC\Tools\MSVC\14.10.25017\include\type_traits(184): error C2770: invalid explicit template argument(s) for 'add_rvalue_reference<_Ty>::type std::declval(void) noexcept'
1>C:\Users\dyz\Documents\vs2017_IDE\VC\Tools\MSVC\14.10.25017\include\type_traits(190): note: see declaration of 'std::declval'
1>Done building project "proj.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

@rouault
Copy link
Member

rouault commented Jun 2, 2024

The error occurs in the vendored nlohmann/json library and looks similar to nlohmann/json#2192. Nothing we can do about. The only solution is to update your compiler to a more up to date version

@rouault rouault closed this as completed Jun 2, 2024
@rouault rouault removed the bug label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants