You need to enable JavaScript to run this app. UE4 4.26在macOS Big Sur编译时出现UPhysicalMaterial未定义符号链接错误
优惠活动
大模型
产品
解决方案
定价
更多

UE4 4.26在macOS Big Sur编译时出现UPhysicalMaterial未定义符号链接错误

问题情况

自研UE4项目在macOS Big Sur环境下执行启动编译流程时,在动态库链接环节触发x86_64架构未定义符号的链接报错,核心报错片段如下:

[10/13] Link UE4Editor-LastRenegade.dylib
Undefined symbols for architecture x86_64:
  "Z_Construct_UClass_UPhysicalMaterial()", referenced from:
      Z_Construct_UClass_ULRNBasePhysicalMaterial_Statics::DependentSingletons in LRNBasePhysicalMaterial.gen.cpp.o
  "UPhysicalMaterial::GetPrivateStaticClass()", referenced from:
[...]
ld: symbol(s) not found for architecture x86_64
对应开发实现
  • 功能目标:自定义继承重写UPhysicalMaterial基类,实现从射线检测结果中提取自定义交互信息的逻辑
  • 自定义子类核心代码:
UCLASS()
class LASTRENEGADE_API ULRNBasePhysicalMaterial : public UPhysicalMaterial
{
    GENERATED_BODY()

public:
    // 构造函数实现于对应cpp文件
    ULRNBasePhysicalMaterial();

public:
    UPROPERTY(EditAnywhere, BlueprintReadOnly)
    class USoundBase* ImpactSFX;

    UPROPERTY(EditAnywhere, BlueprintReadOnly)
    class UParticleSystem* ImpactVFX;

    UPROPERTY(EditAnywhere, BlueprintReadOnly)
    class UMaterialInterface* ImpactDecal;
};

内容的提问来源于stack exchange,提问作者JonathanK

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.11.14 05:06:03