美文网首页
C4668警告

C4668警告

作者: Lif68 | 来源:发表于2019-12-07 14:54 被阅读0次

分类:UE4C++编程

标签:宏冲突

和win10sdk自带的头文件,比如winioctl.h,中定义的宏产生了冲突,一般情况下,可以有两种解决方法

①用
#include "Windows/AllowWindowsPlatformTypes.h"

#include "Windows/PreWindowsApi.h"

#include "冲突的头文件"

#include "Windows/PostWindowsApi.h"

#include "Windows/HideWindowsPlatformTypes.h"

包裹冲突的头文件,但是在ue4中进行这操作的时候记得generated.h必须放在最下方

参考:https://blog.csdn.net/Jingsongmaru/article/details/99287976

②添加bEnableUndefinedIdentifierWarnings = false;


如项目的默认source,在项目的build.cs中添加
bEnableUndefinedIdentifierWarnings = false;

可以参考如下所示

// Fill out your copyright notice in the Description page of Project Settings.

using UnrealBuildTool;

public class 你的项目名 : ModuleRules

{

public 你的项目名(ReadOnlyTargetRules Target) : base(Target)

{

PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" , "HeadMountedDisplay","Sockets", "Networking" , "ApplicationCore", "SlateCore","Slate" ,"UMG"});

PrivateDependencyModuleNames.AddRange(new string[] {  });

        // Uncomment if you are using Slate UI

        // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });

        // Uncomment if you are using online features

        // PrivateDependencyModuleNames.Add("OnlineSubsystem");

        bEnableUndefinedIdentifierWarnings = false;

        // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true

    }

}

同理,如果插件也触发了这个问题,则可以在插件的build.cs加入这段

参考:https://blog.csdn.net/yuxikuo_1/article/details/102799307

相关文章

  • C4668警告

    分类:UE4C++编程 标签:宏冲突 和win10sdk自带的头文件,比如winioctl.h,中定义的宏产生了冲...

  • 警告!警告!

    关键是酒和头孢不能同用。网上图片未说明,俺补充一下。 还有拔牙或做手术前不能服用阿司匹林类溶血药物!

  • 警告警告警告警告警告警告

    图片源自网络 文 | 陈娅希 九寨沟地震发生18分钟后,中国地震台网的机器,25秒出了篇新闻稿。用词准确,行文流畅...

  • iOS编译警告

    iOS编译警告-消除方法参数检查相关的警告 iOS编译警告-消除注释中的警告

  • iOS 常用忽略警告和忽略警告宏定义

    iOS常用的忽略警告类型: 1, 方法弃用警告 2, 不兼容指针类型警告 3, 循环引用警告 4, 未使用变量警告...

  • iOS去除警告

    强制去除警告 单个文件去除警告 在警告处使用以下方法 或在Build Phases中文件名后加入警告类型需要将警告...

  • iOS忽略警告/主动添加警告

    忽略警告 精确忽略指定代码块的警告 大范围忽略指定警告 不推荐,警告放开有利于及时查找问题,大范围忽略警告容易导致...

  • iOS忽略警告/主动添加警告

    忽略警告 精确忽略指定代码块的警告 大范围忽略指定警告 不推荐,警告放开有利于及时查找问题,大范围忽略警告容易导致...

  • IOS关于警告

    1 给代码打上 警告 #warning --------------警告 2 方法加入废弃警告 + (void)s...

  • Bootstrap警告提示框、徽章、面包屑导航样式

    警告框样式 使用.alert设置警告框基础样式,并使用.alert-success等设置警告框颜色; 在使用了警告...

网友评论

      本文标题:C4668警告

      本文链接:https://www.haomeiwen.com/subject/tmjugctx.html