weixin_35724064 2021-08-11 23:25 采纳率: 0%
浏览 317
已结题

UE4.22.3 打包HTML5 失败, fatal error: 'Windows.h' file not found

如题,由于插件引用第三方库存在头文件冲突,
因此在头文件中用


#include"Windows/AllowWindowsPlatformTypes.h"
、、、
#include "Windows/HideWindowsPlatformTypes.h"

包裹第三方库文件,

打包HTML错误提示如下

UATHelper: Packaging (HTML5):     [1/4] MyActor.gen.cpp
UATHelper: Packaging (HTML5):     emcc:INFO: emcc step "parse arguments and setup" took 0.02 seconds
UATHelper: Packaging (HTML5):     In file included from D:\Work\UnRealProject\t1\Intermediate\Build\HTML5\UE4\Inc\t1\MyActor.gen.cpp:8:
UATHelper: Packaging (HTML5):     In file included from D:\Work\UnRealProject\t1\Source\t1/MyActor.h:13:
UATHelper: Packaging (HTML5):     In file included from Runtime\Core\Public\Windows/AllowWindowsPlatformTypes.h:3:
UATHelper: Packaging (HTML5):     In file included from Runtime\Core\Public\Windows/WindowsHWrapper.h:10:
UATHelper: Packaging (HTML5):     Runtime\Core\Public\Windows/MinWindows.h(68,10):  fatal error: 'Windows.h' file not found
UATHelper: Packaging (HTML5):     #include <Windows.h>
UATHelper: Packaging (HTML5):              ^~~~~~~~~~~
UATHelper: Packaging (HTML5):     1 error generated.
UATHelper: Packaging (HTML5):     shared:ERROR: compiler frontend failed to generate LLVM bitcode, halting
UATHelper: Packaging (HTML5):     [2/4] MyActor.cpp
UATHelper: Packaging (HTML5):     emcc:INFO: emcc step "parse arguments and setup" took 0.02 seconds
UATHelper: Packaging (HTML5):     In file included from D:\Work286066\UnRealProject\t1\Source\t1\MyActor.cpp:4:
PackagingResults: Error: 'Windows.h' file not found

尝试了删除,#include"Windows/AllowWindowsPlatformTypes.h" 和 #include "Windows/HideWindowsPlatformTypes.h"就能正常打包。
怎么解决啊。完全不知道问题出在哪里

  • 写回答

2条回答 默认 最新

  • 一把编程的菜刀 2021-08-12 09:06
    关注

    看看是不起那2个里面还包含了Windows.h这个,然后这个包没有或者路径不对

    评论

报告相同问题?

问题事件

  • 系统已结题 8月19日
  • 修改了问题 8月11日
  • 创建了问题 8月11日

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制