-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add support for build with MinGW #46
base: master
Are you sure you want to change the base?
Conversation
Code builds well with MinGW-W64-builds-4.2.0 and later
Thanks ! I also had to add this for https://stackoverflow.com/questions/18551409/localtime-r-support-on-mingw --- a/CMakeLists.txt 2020-01-13 18:31:55.000000000 +0100
+++ b/CMakeLists.txt 2022-07-19 19:29:54.339127866 +0200
@@ -63,6 +63,7 @@
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc" )
elseif (MINGW)
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -U__STRICT_ANSI__" )
+ add_definitions( -D _POSIX_THREAD_SAFE_FUNCTIONS )
elseif (BUILD_WITH_ADDRESS_SANITIZE)
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer" )
SET( ASAN_LIBRARY asan ) |
It compiles on linux, macos, windows microsoft/vcpkg#25901 |
Ping @sgieseking does this look good to you? |
I will see about checking it over the weekend. I don't have MinGW installed on my development computer now. |
@sgieseking Is there any progress on this PR? :) |
@sgieseking Is there any progress on this PR? :) |
I removed the mingw headers. There are not used anymore |
@sgieseking Are there plans on merging this? 😄 |
With this commits you can build anyrpc with MinGW 8.1 and Windows 10.
I have not tried if this breaks any other build configuration.