FS-Driverless / Formula-Student-Driverless-Simulator

A virtual world where Autonomous Systems from different Formula Student teams can compete in time-trial challenges
https://fs-driverless.github.io/Formula-Student-Driverless-Simulator
GNU General Public License v2.0
204 stars 85 forks source link

Airsim double to float conversion (error C2220) #268

Closed wouter-heerwegh closed 2 years ago

wouter-heerwegh commented 3 years ago

Recently tried to install the simulator on a teammates pc and constantly got the error C222 0: the following warning is treated as an error error which was referring to warning C4 244: 'initializing': conversion from 'double' to 'float', possible loss of data.

After some testing, I found that this is due to the newest version of the MSVC compiler. It automatically sets 'Treat warnings as errors' to true.

To disable this, I opened Visual Studio 2019 and went in to project properties > C/C++ > Treat Warnings as Errors and set it to 'No'. Make sure that if you do this, you either selected the correct configuration and platform at the top of this window, or set it to all configurations and all platforms.

If anyone bumps into this problem again, hope this helps you out.

wouter-heerwegh commented 2 years ago

Fixed with pull request #273