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

import VS 2022 compiler error #97

Open
laurentcau opened this issue May 7, 2024 · 2 comments
Open

import VS 2022 compiler error #97

laurentcau opened this issue May 7, 2024 · 2 comments

Comments

@laurentcau
Copy link

Hi,

using

import <rfl/json.hpp>;
import <rfl.hpp>;

Generates warnings and compiler internal error (Not sure they are related.) with VS 2022 17.9.2.

1>E:\build\unreal\external\include\ctre.hpp(274,16): warning C5260: the constant variable 'ctll::construct_from_pointer' has internal linkage in an included header file context, but external linkage in imported header unit context; consider declaring it 'inline' as well if it will be shared across translation units, or 'static' to express intent to use it local to this translation unit
1>(compiling source file '../../external/include/rfl.hpp')
1>E:\build\unreal\external\include\ctre.hpp(274,16): warning C5260: the constant variable 'ctll::construct_from_pointer' has internal linkage in an included header file context, but external linkage in imported header unit context; consider declaring it 'inline' as well if it will be shared across translation units, or 'static' to express intent to use it local to this translation unit
1>(compiling source file '../../external/include/rfl/json.hpp')
1>E:\build\unreal\external\include\rfl\json.hpp(15,1): error C1001: Internal compiler error.
1>E:\build\unreal\external\include\rfl\json.hpp(15,1): error C1001: (compiler file 'D:\a\_work\1\s\src\vctools\Compiler\CxxFE\sl\p1\c\module\writer.cpp', line 6669)
1>E:\build\unreal\external\include\rfl\json.hpp(15,1): error C1001:  To work around this problem, try simplifying or changing the program near the locations listed above.
1>E:\build\unreal\external\include\rfl\json.hpp(15,1): error C1001: If possible please provide a repro here: https://developercommunity.visualstudio.com 
1>E:\build\unreal\external\include\rfl\json.hpp(15,1): error C1001: Please choose the Technical Support command on the Visual C++ 
1>E:\build\unreal\external\include\rfl\json.hpp(15,1): error C1001:  Help menu, or open the Technical Support help file for more information
@laurentcau
Copy link
Author

@liuzicheng1987
Copy link
Contributor

This one is tricky. I don't really know what to do about it. It appears it has something to do with the ctre library, which is a dependency we use.

Apparently it doesn't like this line in ctre.hpp:

constexpr auto construct_from_pointer = construct_from_pointer_t{};

But I personally can't see anything wrong with it. And it's been working fine so far...

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

2 participants