Project

General

Profile

Actions

Backport #7333

closed

VS2012でリンクエラー

Added by yoshidam (Yoshida Masato) over 11 years ago. Updated over 11 years ago.

Status:
Closed
[ruby-dev:46484]

Description

=begin
VS2012でビルドすると未解決のシンボルでリンクエラーになります。

generating x64-msvcr110-ruby200.def
linking import-library x64-msvcr110-ruby200.lib
ライブラリ x64-msvcr110-ruby200.lib とオブジェクト x64-msvcr110-ruby200.exp を作成中
compiling x64-msvcr110-ruby200.rc
dmyext.obj
linking shared-library x64-msvcr110-ruby200.dll
ライブラリ dummy.lib とオブジェクト dummy.exp を作成中
dummy.exp : error LNK2001: 外部シンボル "_xmm@7fffffffffffffff7fffffffffffffff" は未解決です。
x64-msvcr110-ruby200.dll : fatal error LNK1120: 1 件の未解決の外部参照

dumpbin.exeの出力フォーマットが多少変更されたため不要なシンボルが.defファイルに出力されるようです。

diff -u win32/mkexports.rb.org win32/mkexports.rb
--- win32/mkexports.rb.org 2012-11-12 09:55:13.210314600 +0900
+++ win32/mkexports.rb 2012-11-12 10:19:47.935357700 +0900
@@ -115,7 +115,7 @@
next unless l.sub!(/.*?\s(()\s+)?External\s+|\s+/, '')
is_data = !$1
if noprefix or /^[@_]/ =~ l

  •        next if /(?!^)@.*@/ =~ l || /@[[:xdigit:]]{8,16}$/ =~ l ||
    
  •        next if /(?!^)@.*@/ =~ l || /@[[:xdigit:]]{8,32}$/ =~ l ||
            /^_?(?:Init_|.*_threadptr_|DllMain\b)/ =~ l
           l.sub!(/^[@_]/, '') if /@\d+$/ !~ l
          elsif !l.sub!(/^(\S+) \([^@?\`\']*\)$/, '\1')
    

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0