Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error in latest release #2496

Closed
songxiaocheng opened this issue Mar 31, 2020 · 2 comments
Closed

Compilation error in latest release #2496

songxiaocheng opened this issue Mar 31, 2020 · 2 comments

Comments

@songxiaocheng
Copy link
Contributor

songxiaocheng commented Mar 31, 2020

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.

@rajat2004
Copy link
Contributor

Yes, the documentation needs to be updated. I believe from this release AirSim will require UE>=4.22 (or maybe even 4.24). Some more PRs in the line (#2482, #2472) will require the newer UE versions

@madratman
Copy link
Contributor

Updated the docs https://microsoft.github.io/AirSim/build_windows/
Current master works on UE>=4.22, but we do recommend 4.24.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants