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

Error occurs when using Polymorphism with MSVC #795

Open
kshhaja opened this issue Jul 26, 2023 · 1 comment
Open

Error occurs when using Polymorphism with MSVC #795

kshhaja opened this issue Jul 26, 2023 · 1 comment

Comments

@kshhaja
Copy link

kshhaja commented Jul 26, 2023

Hi, all.

I'm in the process of making it possible to send and receive data from external App and UE5 using Cereal.
So far it has been working without problems.
Recently, I'm applying polymorphism for more efficient code.
but, I got an error below in UE5(using MSVC).

traits.hpp(34): [C4668] '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'

To briefly describe the env of my projects:
The code I wrote using Cereal is shared in both External App and UE5,
and I confirmed that the build succeeded and the functions worked well in the External App.
External App is using GCC.

The solution of the problem seems pretty obvious.
#include "cereal/details/traits.hpp"
It seems that there is only processing for GCC or CLANG at the top of this header file.
In fact, when using MSVC, it seems normal to have neither GCC nor CLANG.

Please review and let me know if you find any incorrect information or solutions.
Thank you.

@Yeah-Zi
Copy link

Yeah-Zi commented Oct 12, 2023

a compilation setting issue, adding "bEnableUndefinedIdentifierWarnings=false" in build.cs;

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