-
Notifications
You must be signed in to change notification settings - Fork 188
cmake: Address Missing Winsock Library w/ MinGW #281
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
base: master
Are you sure you want to change the base?
Conversation
Addresses babelouest#268 - gnutls needed to be moved to a later entry in the link list - ws2_32 needed to be added to the link list These were required to build for Win32 MinGW. I have not tested them in other setups.
|
Forced some updates to address other issues including aligning the formatting of my additions with your code and moving the gnutls link position for a linking issue in Windows MinGW. I did not test other platforms to confirm if this would cause issues on those. I will have more information posted on #268. |
Added a section into the INSTALL.md for how to get started in windows using MSYS.
|
Thanks for the PR @pmcgaugh ! Although it's not ready yet. For some reason, moving the I believe it's a small fix but the cmake logic sometimes involves magic and mystery... I'll try and find a fix when I'll have the time, although the workaround is to follow your documentation if I understand correctly. |
|
For work I need to use Windows, hence my current situation. I appreciate you doing a checkout to cover my lack of initial thoroughness! If I find time soon I will switch over to my Linux desktop and try compiling and see if I can get the ordering right to make everyone happy (although I am not familiar with compiling with MSVC...) |
|
I just tried compiling on Linux myself but did not have any issues. I should note that I am relying on uwsc as a test application. Process:git clone https://github.com/pmcgaugh/ulfius
cd ulfius
mkdir build
cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC=ON -DBUILD_UWSC=ON .
cmake --build build
sudo cmake --install build
sudo cp /usr/local/lib/libulfius.so.2.7 /usr/lib
uwsc --version
# ...etcCMake OuptutPlease let me know if you see any obvious differences in your setup or anything I'm doing here! |
This change to the CMakeLists.txt fixes the MinGW / Windows build for my setup. It may not solve anyone else's problem.
I would like someone else with this build config (MinGW / Windows) to confirm that this PR will help with #268 before accepting it.
This change might be needed, but in addition, there might be further configuration errors in the setups present in #268 that are causing issues.
An alternative to this fix would be to place the linking burden on the application. If that is the desired workaround, feel free to close this PR.
Feedback appreciated.
Thank you!