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

CesiumGltfReader.h #993

Open
proximityeffect opened this issue Nov 15, 2024 · 3 comments
Open

CesiumGltfReader.h #993

proximityeffect opened this issue Nov 15, 2024 · 3 comments

Comments

@proximityeffect
Copy link

proximityeffect commented Nov 15, 2024

When I #include <CesiumGltfReader/GltfReader.h> I get an error about async. I'm not using async at all.

[build] C:\Users\user\Desktop\EZVCPKG\2024.07.12\installed\x64-windows-static-md\include\async++/task.h(477): error C2187: syntax error: '::' was unexpected here
[build] C:\Users\user\Desktop\EZVCPKG\2024.07.12\installed\x64-windows-static-md\include\async++/task.h(477): error C2955: 'async::task': use of class template requires template argument list
[build] C:\Users\user\Desktop\EZVCPKG\2024.07.12\installed\x64-windows-static-md\include\async++/task.h(236): note: see declaration of 'async::task'

It autocompletes and links fine, I can link others like <CesiumGltfReader/ImageDecoder.h><CesiumGltfReader/Library.h> just fine. I haven't touched the async++/task.h at all its what was built with cmake for cesium-native. Any help would be appreciated.

@kring
Copy link
Member

kring commented Nov 15, 2024

@proximityeffect what version of C++ are you targetting? C++17? C++20?
If you're using C++20, you should use the version of cesium-native from this branch:
#977

@jqntn
Copy link
Contributor

jqntn commented Nov 27, 2024

When GltfReader.h is included, it includes Material.h which also reports this error:

04c3b9e6-5126-46c6-b6f4-0e2fff23ecb1
image

I'm using C++17 in a console project, I haven't included any windows headers, but somehow the macro is defined, causing compiler errors.

Tested on v0.41.0.

@jqntn
Copy link
Contributor

jqntn commented Nov 27, 2024

Managed to fix this by simply including CesiumGltf/Material.h before CesiumGltfReader/GltfReader.h 🤷‍♂️

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