Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ if(CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "Debug")
endif()

if(WIN32)
link_libraries(ws2_32 mswsock Bcrypt)
endif()

if(MSVC)
message(STATUS "using msvc")
add_definitions(-D_WIN32_WINNT=0x600)
Expand Down Expand Up @@ -288,7 +292,8 @@ set(EXPRESSCPP_CONFIG_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}Targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT lib)

install(EXPORT ${PROJECT_NAME}Targets
DESTINATION ${EXPRESSCPP_CONFIG_INSTALL_DIR}
Expand Down
2 changes: 1 addition & 1 deletion src/expresscpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void ExpressCpp::HandleRequest(request_t req, response_t res, std::function<void
auto eptr = std::current_exception();
if (error_handler_registered_) {
expresscpp::NextRouter next;
auto ec = std::make_error_code(std::errc::no_message);
auto ec = std::make_error_code(std::errc::bad_message);
error_handler_(ec, req, res, next);
} else {
std::rethrow_exception(eptr);
Expand Down