Skip to content

windows mingw环境下编译报错,'InitOnceExecuteOnce' was not declared in this scope #421

@anheida

Description

@anheida

如图所示,编译动态库能编译通过,但是在自己程序中使用libhv时报错,hmutex.h里
'InitOnceExecuteOnce' was not declared in this scope
'InitializeSRWLock' was not declared in this scope
........
image
电脑环境WIN10,mingw,gcc version 7.3.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)
使用CMake -G "MinGW Makefiles" ../ 和cmake --build ./ 命令能够生产动态库
(自己希望的一套代码能够不修改可以在win和Linux下都能跑,现在只有win下报错,Linux下不报错)
新人一枚,恳请大佬能够协助解决一下,不胜感激。
image

编译编译静态库也是报同样的错误

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions