cpprestsdk icon indicating copy to clipboard operation
cpprestsdk copied to clipboard

Support mingw-w64 (from msys2) on Windows.

Open sighingnow opened this issue 4 years ago • 5 comments

Supporting for MinGW on Windows is a long-standling feature request for the cpprestsdk project. This PR makes the codebase compilable with mingw-w64 from msys2, include main library, test cases and examples.

At the same time, this PR has minimized the changeset for the convenience of code review.

Resolves #202, #1361 and #1541.

sighingnow avatar Jan 23 '21 17:01 sighingnow

/cc @barcharcraz.

sighingnow avatar Jan 23 '21 17:01 sighingnow

I took a quick look at this, and I'm a bit concerned about how many new preprocessor branches are added. I'm also concerned that you are conditionally avoiding calling functions that should be available on mingw-w64, as they are in the UCRT and the legacy CRT.

@barcharcraz Thanks for reviewing this PR! I will revise that as soon as my Windows laptop back.

sighingnow avatar Jan 31 '21 05:01 sighingnow

Got this error during "make -j":

[ 98%] Linking CXX shared library ../../../../Binaries/libhttplistener_test.dll
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/httplistener_test.dir/objects.a(building_response_tests.cpp.obj):building_response_tests.cpp:(.rdata$.refptr._ZN3web4http12status_codes2OKE[.refptr._ZN3web4http12status_codes2OKE]+0x0):
undefined reference to `web::http::status_codes::OK'

ysangkok avatar Apr 29 '21 20:04 ysangkok

I guess this PR is dead?

Lord-Kamina avatar Aug 30 '22 14:08 Lord-Kamina

I guess this PR is dead?

Not dead yet. Will address the review comments in this Sep.

sighingnow avatar Sep 01 '22 01:09 sighingnow

Closing. Will reopen when I come back to this project.

sighingnow avatar Feb 19 '23 10:02 sighingnow