Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

missing <cmath> in camera.cpp #4

Closed
bvanevery opened this issue Mar 14, 2020 · 1 comment
Closed

missing <cmath> in camera.cpp #4

bvanevery opened this issue Mar 14, 2020 · 1 comment

Comments

@bvanevery
Copy link

bvanevery commented Mar 14, 2020

I'm on Windows 10. I imported the .sln to Visual Studio 2019. It did some automatic project conversions and let me use the most current SDK. When building the solution I get the following errors:

1>C:\devel\asteroids_d3d12\src\camera.cpp(91,24): error C2039: 'sin': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\vector(24): message : see declaration of 'std'
1>C:\devel\asteroids_d3d12\src\camera.cpp(91,46): error C2039: 'cos': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\vector(24): message : see declaration of 'std'
1>C:\devel\asteroids_d3d12\src\camera.cpp(92,24): error C2039: 'cos': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\vector(24): message : see declaration of 'std'
1>C:\devel\asteroids_d3d12\src\camera.cpp(93,24): error C2039: 'sin': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\vector(24): message : see declaration of 'std'
1>C:\devel\asteroids_d3d12\src\camera.cpp(93,46): error C2039: 'sin': is not a member of 'std'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\vector(24): message : see declaration of 'std'

Adding
#include <cmath>
as the last header file, makes the problem go away. Build succeeds and the demo runs.

On a completely different Windows 10 machine, using Visual Studio 2017, I didn't need this. I don't know how clean that build environment is, or how many additional developer tools I've installed.

@JeffersonMontgomery-Intel
Copy link
Contributor

Thank-you for the report! Fix added to master.

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

No branches or pull requests

2 participants