From: nobu@... Date: 2016-07-07T17:21:28+00:00 Subject: [ruby-core:76297] [Ruby trunk Bug#12545] Ruby 2.3.1 compilation error [Windows] Issue #12545 has been updated by Nobuyoshi Nakada. Description updated According to [MSDN][1], `NET_LUID` is used since Windows Vista released in 2006. Visual C++ 8.0 was released in 2005, so it wouldn't know that union. [1]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa366320(v=vs.85).aspx Maybe the condition for the version is wrong? ```diff diff --git a/win32/win32.c b/win32/win32.c index 47408e0..cc81985 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3913,7 +3913,7 @@ socketpair(int af, int type, int protocol, int *sv) return 0; } -#if !defined(_MSC_VER) || _MSC_VER >= 1400 +#if !defined(_MSC_VER) || _MSC_VER > 1400 /* License: Ruby's */ static void str2guid(const char *str, GUID *guid) ``` ---------------------------------------- Bug #12545: Ruby 2.3.1 compilation error [Windows] https://bugs.ruby-lang.org/issues/12545#change-59540 * Author: Ivan Serdyuk * Status: Feedback * Priority: Normal * Assignee: Nobuyoshi Nakada * ruby -v: ruby 2.3.1 (2016-04-26 patchlevel 112) [i386-mswin32_80] * Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- Greetings. Having problems with compilation: ``` Microsoft (R) Program Maintenance Utility Version 8.00.50727.42 Copyright (C) Microsoft Corporation. All rights reserved. CC = cl -nologo LD = cl -nologo LDSHARED = cl -nologo -LD CFLAGS = -MD -Zi -W2 -wd4100 -wd4127 -wd4210 -wd4214 -wd4255 -wd4574 -w d4668 -wd4710 -wd4711 -wd4820 -wd4996 -we4028 -we4142 -O2sy- -Zm600 XCFLAGS = -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_80 -I./include - I. -I./missing CPPFLAGS = -D_WIN32_WINNT=0x0600 DLDFLAGS = -incremental:no -debug -opt:ref -opt:icf -dll SOLIBS = compiling win32/win32.c win32.c win32/win32.c(3953) : error C2143: syntax error : missing ')' before '*' win32/win32.c(3953) : error C2081: 'NET_LUID' : name in formal parameter list illegal win32/win32.c(3953) : error C2143: syntax error : missing '{' before '*' win32/win32.c(3953) : error C2059: syntax error : ')' win32/win32.c(3953) : error C2059: syntax error : ';' win32/win32.c(3954) : error C2143: syntax error : missing ')' before '*' win32/win32.c(3954) : error C2143: syntax error : missing '{' before '*' win32/win32.c(3954) : error C2059: syntax error : ',' win32/win32.c(3954) : error C2059: syntax error : ')' win32/win32.c(3955) : error C2061: syntax error : identifier 'pConvertInterfaceGuidToLuid' win32/win32.c(3955) : error C2059: syntax error : ';' win32/win32.c(3955) : error C2513: '/*global*/ ' : no variable declared before '=' win32/win32.c(3956) : error C2061: syntax error : identifier 'pConvertInterfaceLuidToNameA' win32/win32.c(3956) : error C2059: syntax error : ';' win32/win32.c(3956) : error C2513: '/*global*/ ' : no variable declared before '=' win32/win32.c(3979) : error C2065: 'pConvertInterfaceGuidToLuid' : undeclared identifier win32/win32.c(3981) : error C2065: 'cigl_t' : undeclared identifier win32/win32.c(3981) : error C2146: syntax error : missing ';' before identifier 'get_proc_address' win32/win32.c(3983) : error C2065: 'pConvertInterfaceLuidToNameA' : undeclared identifier win32/win32.c(3985) : error C2065: 'cilnA_t' : undeclared identifier win32/win32.c(3985) : error C2146: syntax error : missing ';' before identifier 'get_proc_address' win32/win32.c(3992) : error C2065: 'NET_LUID' : undeclared identifier win32/win32.c(3992) : error C2146: syntax error : missing ';' before identifier 'luid' win32/win32.c(3992) : error C2065: 'luid' : undeclared identifier win32/win32.c(4001) : error C2063: 'pConvertInterfaceGuidToLuid' : not a function win32/win32.c(4002) : error C2063: 'pConvertInterfaceLuidToNameA' : not a function NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\cl.EXE"' : return code '0x2' Stop. Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86 ``` -- https://bugs.ruby-lang.org/ Unsubscribe: