Skip to content
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

Fix MinGW build issue on example #2642

Merged
merged 3 commits into from
Feb 12, 2023
Merged

Fix MinGW build issue on example #2642

merged 3 commits into from
Feb 12, 2023

Conversation

zEuS0390
Copy link
Contributor

Fix build issue #2638 on example by adding ws2_32 in these two target_include_directories if the type of compiler is from MinGW.

target_link_libraries(spdlog PUBLIC Threads::Threads $<$<BOOL:${MINGW}>: ws2_32>)
target_link_libraries(spdlog_header_only INTERFACE Threads::Threads $<$<BOOL:${MINGW}>: ws2_32>)

I also made some little changes to "udp_client-windows.h" which uses pragma comment macros only when the Visual C++ compiler is used.

#if defined(_MSC_VER)
#	pragma comment(lib, "Ws2_32.lib")
#	pragma comment(lib, "Mswsock.lib")
#	pragma comment(lib, "AdvApi32.lib")
#endif

@gabime
Copy link
Owner

gabime commented Feb 11, 2023

Thanks. Please move the cmake change to the example/CMakeLists.txt. The main cmake doesn't deal with the udp sink.

@zEuS0390
Copy link
Contributor Author

Ok, got it.

@gabime gabime merged commit da14258 into gabime:v1.x Feb 12, 2023
@gabime
Copy link
Owner

gabime commented Feb 12, 2023

Thanks @zEuS0390

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants