Bug #13033
closed![Author: Anonymous](/images/anonymous.png?1722288379)
2.4.0-rc1, build error with VS2015
Description
I got following error message when building 2.4.0-rc1 with Visual Studio 2015 update 3. Attached "rc1_output.txt" is full-length nmake output.
2.4.0-preview3 doesn't have this error.
linking shared-library x64-vcruntime140-ruby240.dll x64-vcruntime140-ruby240.def : error LNK2001: 外部シンボル "vsnprintf_s_l" は未解決です。 x64-vcruntime140-ruby240.def : error LNK2001: 外部シンボル "vsprintf_s_l" は未解決です。 dummy.lib : fatal error LNK1120: 2 件の未解決の外部参照 NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\cl.EXE"' : リターン コード '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.EXE"' : リターン コ ード '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.EXE"' : リターン コ ード '0x2' Stop.
Files
Updated by naruse (Yui NARUSE) over 7 years ago
Could you try following patch?
diff --git a/win32/mkexports.rb b/win32/mkexports.rb
index d26acbb107..8fc7d9ddb5 100755
--- a/win32/mkexports.rb
+++ b/win32/mkexports.rb
@@ -114,7 +114,7 @@ def each_export(objs)
when /OBJECT/, /LIBRARY/
next if /^[[:xdigit:]]+ 0+ UNDEF / =~ l
next unless /External/ =~ l
- next if /(?:_local_stdio_printf_options|v(f|sn?)printf_l)\Z/ =~ l
+ next if /(?:_local_stdio_printf_options|v(f|sn?)printf(?:_s)?_l)\Z/ =~ l
next unless l.sub!(/.*?\s(\(\)\s+)?External\s+\|\s+/, '')
is_data = !$1
if noprefix or /^[@_]/ =~ l
Updated by naruse (Yui NARUSE) over 7 years ago
- Target version set to 2.4
Updated by usa (Usaku NAKAMURA) over 7 years ago
Yui NARUSE wrote:
Could you try following patch?
I'd tried same patch and it seemed OK.
I'll commit it later.
Updated by usa (Usaku NAKAMURA) over 7 years ago
- Status changed from Open to Closed
Applied in changeset r57079.
Fixed link error with VC14.
- win32/mkexports.rb (Exports::Mswin#each_exports): should ignore
vsprintf_s_l
and the like just likevsprintf_l
.
[ruby-dev:49899] [Bug #13033]
Updated by Anonymous over 7 years ago
I've just confirmed the patch fixed this issue. Many thanks.