Replies: 1 comment 2 replies
-
Yep, that's MSVC issue, and it's handled in provided scripts here: |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Guys,
I'm porting my engine code to bgfx, using Visual Studio 2022, the code builds with bgfx.h included and some initialization code works fine, but as soon as I include the bgfx_utils.h file (to load some textures), my build fails with this error:
fatal error C1189: #error: "C++14 standard support is required to build.
This is thrown at bx/include/bx/platform.h around line# 450
I've already set my project settings in VS to use C++ 20, and even placing this code:
#if defined(__cplusplus)
#define STRINGIFY(s) XSTRINGIFY(s)
#define XSTRINGIFY(s) #s
#pragma message ("__cplusplus=" STRINGIFY(__cplusplus))
I get:
__cplusplus=199711L
I've also added all bgfx, bx, compat include paths to my include path settings of project.
any help on how to solve this annoying issue?
Sorry found the solution:
in MSVC this should be added in Project Settings->C/C++->All Options->Additional Options:
manually add /Zc:__cplusplus this way the __cplusplus gets the correct c++ version number!
Beta Was this translation helpful? Give feedback.
All reactions