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

[MSVC] QGroundcontrol failed to build with msvc due to error C2666 on Windows with /c++latest compile option #10462

Closed
Zhaojun-Liu opened this issue Oct 25, 2022 · 2 comments

Comments

@Zhaojun-Liu
Copy link

Expected Behavior

Build with msvc successfully.

Current Behavior

F:\gitP\mavlink\qgroundcontrol\libs\libevents\libevents\libs\cpp\parse\parser.cpp(634): error C2666: 'nlohmann::detail::iter_impl<const nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer,std::vector<uint8_t,std::allocator<uint8_t>>>>::operator !=': overloaded functions have similar conversions

Steps to Reproduce:

Please provide an unambiguous set of steps to reproduce the current behavior

  1. git clone https://github.com/mavlink/qgroundcontrol F:\gitP\mavlink\qgroundcontrol
  2. git -C "F:\gitP\mavlink\qgroundcontrol" fetch --recurse-submodules=no --force
  3. git -C "F:\gitP\mavlink\qgroundcontrol" reset --hard 9c77d15 (currently the latest commit)
  4. git -C "F:\gitP\mavlink\qgroundcontrol" submodule sync
  5. git -C "F:\gitP\mavlink\qgroundcontrol" submodule update --init --recursive
  6. set CL= /std:c++latest
  7. mkdir F:\gitP\mavlink\qgroundcontrol\build_amd64 and cd F:\gitP\mavlink\qgroundcontrol\build_amd64
  8. set related Path (in my test environment like below):
    8.1 set PATH=F:\tools\qt5\qt\5_15_2\msvc2019_64\bin;F:\tools\jom_1_1_2;%PATH%
  9. qmake -r ../qgroundcontrol.pro
  10. set CL=%CL% /wd5055 /D_HAS_DEPRECATED_RESULT_OF=1 /D_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING
  11. jom /U

System Information

When posting bug reports, include the following information

  • Operating System: Windows Server 2022 Datacenter 21H2
  • VS version: VS2019 16.11.20

Detailed Description

Recently, we updated the commit of Qgroundcontrol for MSVC RWC testing, it built failed due to error C2666 with compile option /c++latest like below:
F:\gitP\mavlink\qgroundcontrol\libs\libevents\libevents\libs\cpp\parse\parser.cpp(634): error C2666: 'nlohmann::detail::iter_impl<const nlohmann::basic_json<std::map,std::vector,std::string,bool,int64_t,uint64_t,double,std::allocator,nlohmann::adl_serializer,std::vector<uint8_t,std::allocator<uint8_t>>>>::operator !=': overloaded functions have similar conversions

Log Files and Screenshots

detailed log files:
build (3).log

@Zhaojun-Liu
Copy link
Author

Any updates of this issue? Thanks.

@HTRamsey
Copy link
Collaborator

You can compile without treating warnings as errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants