Lichtso / netLink

Socket and Networking Library using msgpack.org[C++11]
GNU General Public License v3.0
217 stars 48 forks source link

Windows 10 Support #16

Closed DJuego closed 8 years ago

DJuego commented 8 years ago

Hello Lichtso! I have come back! :-)

I simply wanted to report to you that netlink seems not to get compiled with Microsoft Visual Studio 14.0.

I have attached a full log for:

cmake -G 'NMake Makefiles' -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX=$DIRECTORIO_LOCAL -D DOXYGEN_EXECUTABLE=$ARCHIVO_DOXYGEN -D DOXYGEN_DOT_EXECUTABLE=$ARCHIVO_DOT  ../.. 
nmake   

and

cmake -G 'NMake Makefiles' -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=$DIRECTORIO_LOCAL -D DOXYGEN_EXECUTABLE=$ARCHIVO_DOXYGEN -D DOXYGEN_DOT_EXECUTABLE=$ARCHIVO_DOT  ../..       
nmake

However, it builds like a charm in MinGW 5.3.0

P.S: I have the same problem with: cmake -G 'Visual Studio 14 2015'

output log netlink

Lichtso commented 8 years ago

I don't have any windows machines at the moment but I might access one by tomorrow.

Which version of cmake and platform (Win 7, 8, 10) are you using?

DJuego commented 8 years ago
Lichtso commented 8 years ago

Upgraded from 8 to 10 or is it a fresh installation? Do you experience similar problems with other C++11 code?

DJuego commented 8 years ago

P.S: I am using the netLink github version.

Lichtso commented 8 years ago

The github version?

Also lets take a look at your build command: cmake -G 'NMake Makefiles' -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=$DIRECTORIO_LOCAL -D DOXYGEN_EXECUTABLE=$ARCHIVO_DOXYGEN -D DOXYGEN_DOT_EXECUTABLE=$ARCHIVO_DOT ../..

DOXYGEN_EXECUTABLE and DOXYGEN_DOT_EXECUTABLE are not needed as the docs are pre built. CMAKE_BUILD_TYPE=Debug / Release does not really matter, the outcome should be the same, so testing only "Release" is enough.

I just pushed a commit: 2e992cd Could you pull it and execute these two commands:

cmake -G 'NMake Makefiles' -D CMAKE_BUILD_TYPE=Release ../.. cmake -G 'Visual Studio 14 2015' -D CMAKE_BUILD_TYPE=Release ../..

Search for these values (and post them):

CXX_FLAGS = CXX_DEFINES = _WIN32_WINNT= WINVER=

in a file like CMakeFiles/static.dir/flags.make the path might be a bit different on windows and nmake, but a recursive text search should find it anyway.

Thanks

DJuego commented 8 years ago

Yep!

CMakeFiles/static.dir/flags.make (same path :-))

# CMAKE generated file: DO NOT EDIT!
# Generated by "NMake Makefiles" Generator, CMake Version 3.5

# compile CXX with C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe
CXX_FLAGS =  /DWIN32 /D_WINDOWS /W3 /GR /EHsc /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1  

CXX_DEFINES = -DWINVER=0x0100000100050806 -D_WIN32_WINNT=0x0100000100050806

CXX_INCLUDES = -IP:\Plataformas\x32-x64\TRABAJO_MSVC2015_x64\netLink\PUBLIC -IP:\Plataformas\x32-x64\TRABAJO_MSVC2015_x64\netLink\include 

P.S:

The github version?

Yes. The master version. The most recent version with the very last commit. Sorry for my English. :-/

output log netlink v2

Lichtso commented 8 years ago

This might fix it: cc051d1

DJuego commented 8 years ago

yes, yes, yes, YES!!

Thanks and congrats, Lichtso! The most valuable asset of netLink are you yourself. :-)

I attach you the output log in case you want to face some warnings. :-) output log netlink v3

Lichtso commented 8 years ago

Thanks, I will take a look at it.

The problem explained: Like the Millennium bug when 1999+1 became 19100 instead of 2000, 0x0A00 became 0x01000 because of the missing dec to hex conversion. Windows 10 is simply the first version with 2 digits.