Closed eaglesharkmayonnaise closed 1 year ago
Apologies, I'm not much of a Windows user, but I noticed two things when I was doing some tests with Windows:
For MSVS 2019, I have been using this:
cmake -G "Visual Studio 16 2019" -Ax64 -DSOCKPP_BUILD_EXAMPLES=ON ..
I'm going to pull out a Windows machine later this week. I'll double check if there's some issue with the static build, but to my knowledge it was working fine.
C:\Users\ssss\Desktop\sockpp\build>cmake -G "Visual Studio 16 2019" -Ax64 -DSOCKPP_BUILD_EXAMPLES=ON ..
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
-- The C compiler identification is MSVC 19.25.28614.0
-- The CXX compiler identification is MSVC 19.25.28614.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Creating static library: sockpp-static
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Using library for samples: sockpp-static
-- Using library for samples: sockpp-static
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/ssss/Desktop/sockpp/build
sockpp.sln
and build it
1>------ Build started: Project: tcpechotest, Configuration: Debug x64 ------
1>tcpechotest.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\include\random(1902,5): error C2338: invalid template argument for uniform_int_distribution: N4659 29.6.1.1 [rand.req.genl]/1e requires one of short, int, long, long long, unsigned short, unsigned int, unsigned long, or unsigned long long
1>C:\Users\ssss\Desktop\sockpp\examples\tcp\tcpechotest.cpp(92): message : see reference to class template instantiation 'std::uniform_int_distribution<char>' being compiled
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.25.28610\include\random(1902,1): error C2338: note: char, signed char, unsigned char, char8_t, int8_t, and uint8_t are not allowed
1>C:\Users\ssss\Desktop\sockpp\examples\tcp\tcpechotest.cpp(106,9): warning C4244: 'initializing': conversion from 'ssize_t' to 'int', possible loss of data
1>Done building project "tcpechotest.vcxproj" -- FAILED.
2>------ Skipped Build: Project: INSTALL, Configuration: Debug x64 ------
2>Project not selected to build for this solution configuration
========== Build: 0 succeeded, 1 failed, 12 up-to-date, 1 skipped ==========
Oh, I think there's a fix for that in the develop
branch from PR #44, originally reported in Iuuse #42.
I don't know if this was actually foxed or not, but will attempt to recreate before the next v0.8.1 release.
This all builds for me now with the latest release. If you are still having trouble, feel free to reopen this issue with any new information.
git clone https://github.com/fpagliughi/sockpp
run
Visual Studio 2019 Developer Command Prompt v16.5.4
cd sockpp && mkdir build && cd build
run cmake
build
examples/tcp/tcpecho.cpp