[#10793] 今度こそ (patch of the ruby-1.4.6 for NT4.0&VC4.0 on DEC Alpha.) — kou@...1609.sip.eee.yamaguchi-u.ac.jp (Koichi Okada)

岡田です。

10 messages 2000/09/01

[#10920] SIGINT on windows — "Nobuyoshi.Nakada" <nobu.nakada@...>

なかだです。

17 messages 2000/09/14
[#11077] Re: SIGINT on windows — matz@... (Yukihiro Matsumoto) 2000/09/27

まつもと ゆきひろです

[#10944] dummy DLL on Windows — "Nobuyoshi.Nakada" <nobu.nakada@...>

なかだです。

19 messages 2000/09/18
[#10955] Re: dummy DLL on Windows — WATANABE Hirofumi <eban@...> 2000/09/19

わたなべです.

[#10963] Re: dummy DLL on Windows — "Nobuyoshi.Nakada" <nobu.nakada@...> 2000/09/19

なかだです。

[#10964] Re: dummy DLL on Windows — WATANABE Hirofumi <eban@...> 2000/09/19

わたなべです.

[#10978] [PATCH] require in require — "Nobuyoshi.Nakada" <nobu.nakada@...>

なかだです。

15 messages 2000/09/20

[#10985] httphead.rb proxy version problem — Katsuyuki Komatsu <komatsu@...>

小松です.

16 messages 2000/09/20
[#10989] Re: httphead.rb proxy version problem — Minero Aoki <aamine@...> 2000/09/20

あおきです。

[ruby-dev:10944] dummy DLL on Windows

From: "Nobuyoshi.Nakada" <nobu.nakada@...>
Date: 2000-09-18 10:57:15 UTC
List: ruby-dev #10944
なかだです。

  以前うまくいかなかった Windows でのダミー DLL ですが、internal name に 
DLL 名をつけた DEF ファイルでインポートライブラリを作ればできるようです。
データに対する参照も問題ないようです。ただし、DLL 名に . は使 ません。

  以下、mswin32 版での例。


[i586-mswin32 19:42:05]$ head -5 ruby.def
EXPORTS
GetCurrentThreadHandle=ruby-mswin32.GetCurrentThreadHandle
Init_Array=ruby-mswin32.Init_Array
Init_Bignum=ruby-mswin32.Init_Bignum
Init_Comparable=ruby-mswin32.Init_Comparable
[i586-mswin32 19:42:10]$ link -noentry -out:ruby.dll -machine:ix86 -dll -def:ruby.def
Microsoft (R) 32-Bit Incremental Linker Version 3.00.5270
Copyright (C) Microsoft Corp 1992-1995. All rights reserved.

LINK : warning LNK4001: オブジェクト ファイルが指定されていません。ライブラリを使用します。
   ライブラリ ruby.lib とオブジェクト ruby.exp を作成中
[i586-mswin32 19:45:41]$ make -C ext/fcntl RUBY_SO_NAME=ruby -n
make: Entering directory `/home/nokada/src/ruby/devel/i586-mswin32/ext/fcntl'
env LIB='c:\\home\\nokada\\src\\ruby\\devel\\i586-mswin32;C:/MSDEV/lib' \
cl -LD  -DIMPORT -DNT -O2b2x -Zi -G5    -o fcntl.so fcntl.obj ruby.lib  -link /INCREMENTAL:no /EXPO
T:Init_fcntl
make: Leaving directory `/home/nokada/src/ruby/devel/i586-mswin32/ext/fcntl'
[i586-mswin32 19:45:46]$ make -C ext/fcntl RUBY_SO_NAME=ruby
make: Entering directory `/home/nokada/src/ruby/devel/i586-mswin32/ext/fcntl'
env LIB='c:\\home\\nokada\\src\\ruby\\devel\\i586-mswin32;C:/MSDEV/lib' \
cl -LD  -DIMPORT -DNT -O2b2x -Zi -G5    -o fcntl.so fcntl.obj ruby.lib  -link /INCREMENTAL:no /EXPO
T:Init_fcntl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 10.00.5270 for 80x86
Copyright (C) Microsoft Corp 1984-1995. All rights reserved.

Microsoft (R) 32-Bit Incremental Linker Version 3.00.5270
Copyright (C) Microsoft Corp 1992-1995. All rights reserved.

/out:fcntl.dll
/dll
/implib:fcntl.lib
/debug
/out:fcntl.so
/INCREMENTAL:no
/EXPORT:Init_fcntl
fcntl.obj
ruby.lib
   ライブラリ fcntl.lib とオブジェクト fcntl.exp を作成中
make: Leaving directory `/home/nokada/src/ruby/devel/i586-mswin32/ext/fcntl'
[i586-mswin32 19:45:59]$ dumpbin -imports ext/fcntl/fcntl.so
Microsoft (R) COFF Binary File Dumper Version 3.00.5270
Copyright (C) Microsoft Corp 1992-1995. All rights reserved.


Dump of file ext/fcntl/fcntl.so

File Type: DLL

         Section contains the following Imports

            ruby.dll
                108   rb_define_module
                183   rb_int2inum
                102   rb_define_const

            KERNEL32.dll
                 8B   FreeEnvironmentStringsA
                 F6   GetOEMCP
                 16   CloseHandle
                 9F   GetCommandLineA
                103   GetProcAddress
                 EB   GetModuleHandleA
                137   GetVersion
                 62   ExitProcess
                155   HeapCreate
                157   HeapDestroy
                1FA   SetHandleCount
                 DC   GetFileType
                116   GetStdHandle
                114   GetStartupInfoA
                 E9   GetModuleFileNameA
                 98   GetCPInfo
                 92   GetACP
                206   SetStdHandle
                1F8   SetFilePointer
                193   MultiByteToWideChar
                 D0   GetEnvironmentStrings
                 8C   FreeEnvironmentStringsW
                 D2   GetEnvironmentStringsW
                242   WideCharToMultiByte
                 48   DisableThreadLibraryCalls
                24F   WriteFile
                153   HeapAlloc
                159   HeapFree
                178   LoadLibraryA
                 E1   GetLastError
                1D7   SetConsoleCtrlHandler
                 83   FlushFileBuffers
                226   UnhandledExceptionFilter

     Summary

        3000 .data
        1000 .idata
        1000 .rdata
        1000 .reloc
        4000 .text
[i586-mswin32 19:46:15]$ ./ruby -r ext/fcntl/fcntl.o -e 'p Fcntl::constants'
["O_WRONLY", "O_RDWR", "O_RDONLY", "O_APPEND", "O_TRUNC", "O_EXCL", "O_CREAT"]
[i586-mswin32 19:48:30]$ make -C ext/nkf/ RUBY_SO_NAME=ruby
make: Entering directory `/home/nokada/src/ruby/devel/i586-mswin32/ext/nkf'
env LIB='c:\\home\\nokada\\src\\ruby\\devel\\i586-mswin32;C:/MSDEV/lib' \
cl -LD  -DIMPORT -DNT -O2b2x -Zi -G5    -o nkf.so nkf.obj ruby.lib  -link /INCREMENTAL:no /EXPORT:In
it_nkf
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 10.00.5270 for 80x86
Copyright (C) Microsoft Corp 1984-1995. All rights reserved.

Microsoft (R) 32-Bit Incremental Linker Version 3.00.5270
Copyright (C) Microsoft Corp 1992-1995. All rights reserved.

/out:nkf.dll
/dll
/implib:nkf.lib
/debug
/out:nkf.so
/INCREMENTAL:no
/EXPORT:Init_nkf
nkf.obj
ruby.lib
   ライブラリ nkf.lib とオブジェクト nkf.exp を作成中
make: Leaving directory `/home/nokada/src/ruby/devel/i586-mswin32/ext/nkf'
[i586-mswin32 19:48:42]$ ./ruby -r ext/nkf/nkf.o -e 'Nkf::nkf()'
-e:1: uninitialized constant Nkf (NameError)
[i586-mswin32 19:48:59]$ ./ruby -r ext/nkf/nkf.o -e 'NKF::nkf()'
-e:1:in `nkf': wrong # of arguments(0 for 2) (ArgumentError)
        from -e:1


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦


In This Thread

Prev Next