-
Notifications
You must be signed in to change notification settings - Fork 440
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
mqtt\ssl_options.h(470): error C2062: type 'auto' unexpected #513
Comments
Seems like a problem with the Visual Studio language server. Is there a way so set what version of C++ is expects? C++11, C++17, etc? |
Unreal Engine 5.4.4 specifically use C++ 20 |
Sorry, I'm not much of a Windows developer anymore. The trailing return type is valid C++11 (and beyond) syntax. The library builds fine on the command line when I use CMake and the MSVC CLI tools. Is it maybe that it's trying to build the library for C++20, and something about that has changed? I've only been testing with C++11, and now C++17 for the upcoming version. |
yes, probably you are right. |
Yeah, the C compiler isn't putting out breaking changes every 3 years! Are you compiling with the CMake build, or using your own? (Meaning the CMake should be forcing the compiler to use C++11.. and why don't I see the problem building from the command line). Also, what version of the library are you using? The latest v1.4.1 release? |
I am using CMake and master version. I don't get any error while building library's itself and I can get mqtt static lib in my install location. Like you said, generated solution uses older version of C++ But after integrating it to Unreal Engine 5 (it uses C++ 20), project give that error and doesn't open. This is my plugin's third party folder. |
Sorry I have no experience with Unreal Engine and have no idea what it may be trying to do. Out of curiosity, I tried compiling as C++20, by updating the main CMake file:
It compiled fine, but I only tried it on Linux with g++, since I don't have a Windows machine readily available at the moment. I just wanted to rule out a problem with standard C++ as the standard evolves. The really crazy thing about the error is that it's not even the first place in that file where it encounters It's in the middle of the builder class where nearly every method uses that same pattern. |
I built both paho.mqtt c and cpp libraries without problem and integrated them to Unreal Engine 5.
But when I try to open UE5 project, Visual Studio 2022 gives this error.
I am using openssl 1.1.1t and added it to UE5, too.
The text was updated successfully, but these errors were encountered: