Skip to content

Win10+VS2022+CMake3.26编译失败 #227

@Mr-Z2001

Description

@Mr-Z2001

QPanda

基本信息

  • QPanda 版本:2.1.16
  • 操作系统:Win10

Bug是什么?

在VS2022下无法编译,提示找不到系统库的一些内容。
其中一条报错信息:(直接复制的VS的报错)
Severity Code Description Project File Line Suppression State
Error G4BAEFBA8 'condition_variable' in namespace 'std' does not name a type D:\DevPack\QPanda-2\build\x64-Release\QPanda-2 D:\DevPack\QPanda-2\ThirdParty\antlr4\runtime\src\support\CPPUtils.h 69

点开源文件,所有的#include #include 之类的都会标红

复现Bug的步骤?

建议的解决方案

VS2022中没有CMAKE选项卡了,取而代之的是Build(没记错的话是《生成》)选项卡。这个选项卡里有BuildAll和Install。我的理解是先Build再Install,但是在Build这一步失败了。按照我的理解,iostream之类的东西不用写进CMakeLists.txt中。希望能给出一个解决方案,感谢。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions