Skip to content

Compilation error in latest release #2496

@songxiaocheng

Description

@songxiaocheng

The Blocks project in AirSim v1.3.0 have compilation errors with UE 4.18:

1><path-ro-airsim>\Unreal\Environments\Blocks\Plugins\AirSim\Source\WorldSimApi.cpp(211): error C2660: 'DrawDebugString': function does not take 8 arguments
1>C:\Program Files\Epic Games\UE_4.18\Engine\Source\Runtime\Engine\Public\DrawDebugHelpers.h(47): note: see declaration of 'DrawDebugString'
1><path-ro-airsim>\Unreal\Environments\Blocks\Plugins\AirSim\Source\WorldSimApi.cpp(230): error C2660: 'DrawDebugString': function does not take 8 arguments
1>C:\Program Files\Epic Games\UE_4.18\Engine\Source\Runtime\Engine\Public\DrawDebugHelpers.h(47): note: see declaration of 'DrawDebugString'

DrawDebugString(simmode_->GetWorld(), simmode_->getGlobalNedTransform().fromGlobalNed(positions[idx]), FString(strings[idx].c_str()), NULL, color.ToFColor(true), duration, false, scale);

DrawDebugString(simmode_->GetWorld(), simmode_->getGlobalNedTransform().fromGlobalNed(poses[idx]).GetLocation(), FString(names[idx].c_str()), NULL, color.ToFColor(true), duration, false, text_scale);

It is because DrawDebugString in UE 4.18 was declared to have only 7 arguments. The last argument is missing. This is fixed by UE later (it seems form UE 4.20, see this commit). However, the "empty versions" of this function still not changed but it seems irrelevant to this Airsim issue (I am not familiar with UE's implementation but there is a UE issue mentioned this, see here).

But the Airsim documentation still recommends UE 4.18. I think systematically upgrading UE to newer versions is a good way to fix this problem. Temporarily, I have to delete the last argument of DrawDebugString in WorldSimApi.cpp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions