-
Notifications
You must be signed in to change notification settings - Fork 95
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
Cannot use in CLang C++ 20 #178
Comments
Hi! Can you provide a description how to reproduce your problem? |
Hey, I then create some code in main: // other includes
#include "Libraries/restinio/all.hpp"
int main()
{
auto port = 5690;
auto address = "localhost";
restinio::run(
restinio::on_thread_pool(2)
.port(port)
.address(address)
.request_handler([](auto req) {
return req->create_response().set_body("Hello, World!").done();
})
);
return 0;
} The above code works fine with Microsoft compiler, but not clang. No errors in the code tho, only his EDIT: It doesn't work with any CLang C++ version, not just 20 |
Thanks for an explanation. RESTinio itself is a header-only project, but it requires at least one dependency that should be compiled and then linked to the resulting executable: http_parser. fmtlib can be used as a header only or as a compiled library. I suppose that when you build your example by using VC++ then some |
Do you mean link it within clang or embed it as source? |
I mean that you have to compile and link http_parser. You can do it as a separate library or by including its source into your project. BTW, you can found more information about building RESTinio here: https://stiffstream.com/en/docs/restinio/0.6/obtaining.html#build PS. I don't use VisualStudio and don't know how to use VisualStudio projects. I hope VisualStudio supports CMakeLists.txt files. |
I am trying to use this in a CLang C++ 20 in visual studio 2022 project and I get errors, it works fine with Microsoft's compiler
The text was updated successfully, but these errors were encountered: