purecpp-org / cinatra Goto Github PK
View Code? Open in Web Editor NEWA sinatra inspired modern c++ web framework
Home Page: http://purecpp.org/
License: Apache License 2.0
A sinatra inspired modern c++ web framework
Home Page: http://purecpp.org/
License: Apache License 2.0
compile error on g++ (Ubuntu 5.1.0-0ubuntu11~14.04.1) 5.1.0
cd /home/phonzia/cinatra/build/examples/cinatra && g++ -I/home/phonzia/cinatra/examples/cinatra/../../include -std=c++1y -Wall -Wextra -o CMakeFiles/cinatra.dir/main.cpp.o -c /home/phonzia/cinatra/examples/cinatra/main.cpp
In file included from /home/phonzia/cinatra/examples/hello_world/main.cpp:1:0:
/home/phonzia/cinatra/examples/hello_world/../../include/cinatra/cinatra.hpp: In member function ‘T& cinatra::Cinatra::get_middleware()’:
/home/phonzia/cinatra/examples/hello_world/../../include/cinatra/cinatra.hpp:107:28: error: expected primary-expression before ‘>’ token
return aop_.get_aspect();
^
/home/phonzia/cinatra/examples/hello_world/../../include/cinatra/cinatra.hpp:107:30: error: expected primary-expression before ‘)’ token
return aop_.get_aspect();
^
In file included from /home/phonzia/cinatra/examples/cinatra/main.cpp:8:0:
/home/phonzia/cinatra/examples/cinatra/../../include/cinatra/cinatra.hpp: In member function ‘T& cinatra::Cinatra::get_middleware()’:
/home/phonzia/cinatra/examples/cinatra/../../include/cinatra/cinatra.hpp:107:28: error: expected primary-expression before ‘>’ token
return aop_.get_aspect();
^
/home/phonzia/cinatra/examples/cinatra/../../include/cinatra/cinatra.hpp:107:30: error: expected primary-expression before ‘)’ token
return aop_.get_aspect();
int num_threads_ = 1;
int num_threads_ = std::thread::hardware_concurrency();
不知道是否我理解错误了,如果CINATRA_SINGLE_THREAD没定义,不是应该是多线程吗?为什么这里却说#ifndef CINATRA_SINGLE_THREAD, num_threads = 1?
There was an issue in cinatra.hpp
void run()
{
HTTPServer s(num_threads_);
....
...
}
need fixed as below:
void run()
{
HTTPServer s(num_threads_);
HTTPServer s;
....
}
如题:listen接口能不能支持返回值是否bind端口或者listen成功?实际使用中我们发现端口被占用了,没有任何错误信息提示我们。
如果在每个头文件里加入注释,解释一下每个类的功能,这样会不会让大家理解代码容易一些呢?
能不能加入上传文件支持
Any help?
[ 96%] Built target cinatra_test
2 warnings generated.
[100%] Linking CXX executable cinatra
cd /Users/mic/vm/ui/cinatra/build/examples/cinatra && /usr/local/Cellar/cmake/3.3.0/bin/cmake -E cmake_link_script CMakeFiles/cinatra.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/cinatra.dir/main.cpp.o -o cinatra /usr/local/lib/libboost_coroutine-mt.dylib /usr/local/lib/libboost_context-mt.dylib /usr/local/lib/libboost_system-mt.dylib /usr/local/lib/libboost_thread-mt.dylib /usr/local/lib/libboost_chrono-mt.dylib /usr/local/lib/libboost_date_time-mt.dylib /usr/local/lib/libboost_regex-mt.dylib /usr/local/lib/libboost_filesystem-mt.dylib /usr/local/lib/libboost_unit_test_framework-mt.dylib /usr/lib/libssl.dylib /usr/lib/libcrypto.dylib -lpthread
Undefined symbols for architecture x86_64:
"_ERR_remove_thread_state", referenced from:
boost::asio::ssl::detail::openssl_init_base::do_init::~do_init() in main.cpp.o
"_TLSv1_1_client_method", referenced from:
boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in main.cpp.o
"_TLSv1_1_method", referenced from:
boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in main.cpp.o
"_TLSv1_1_server_method", referenced from:
boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in main.cpp.o
"_TLSv1_2_client_method", referenced from:
boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in main.cpp.o
"_TLSv1_2_method", referenced from:
boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in main.cpp.o
"_TLSv1_2_server_method", referenced from:
boost::asio::ssl::context::context(boost::asio::ssl::context_base::method) in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [examples/cinatra/cinatra] Error 1
make[1]: *** [examples/cinatra/CMakeFiles/cinatra.dir/all] Error 2
make: *** [all] Error 2
比如gcc的./contrib/download_prerequisites,自动判断依赖库是否需要安装或者升级,运行完毕就可以直接编译
Would you like to replace any double quotes by angle brackets around file names for include statements?
multipart_parser* multipart_parser_init
(const char boundary, const multipart_parser_settings settings) {
size_t boundary_length = strlen(boundary);
multipart_parser* p = malloc(sizeof(multipart_parser) +
boundary_length +
boundary_length + 9);
strcpy_s(p->multipart_boundary, boundary_length, boundary);
boundary_length 这个参数给得有问题,应该是boundary_length + 1
Hey,
it would be nice if you guys could do english commit messages instead of chinese, because I cannot understand them.
(English comments in source code would be nice too.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.