Issue #17929 has been reported by Terabin (Allyson Souza Bacon).

----------------------------------------
Bug #17929: Compile fail in Windows --with-static-linked-ext
https://bugs.ruby-lang.org/issues/17929

* Author: Terabin (Allyson Souza Bacon)
* Status: Open
* Priority: Normal
* ruby -v: 3.0.1
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
I can compile Ruby normally without --with-static-linked-ext, but when I tr=
y to use this command the following problem occurs:

``` shell
win32ole_typelib.c
compiling C:/ruby-3.0.1/ext/win32ole/win32ole_variable.c
win32ole_variable.c
compiling C:/ruby-3.0.1/ext/win32ole/win32ole_variant.c
win32ole_variant.c
compiling C:/ruby-3.0.1/ext/win32ole/win32ole_variant_m.c
win32ole_variant_m.c
linking static-library win32ole.lib
installing default win32ole libraries
cp C:/ruby-3.0.1/ext/win32ole/lib/win32ole/property.rb ../../.ext/common/wi=
n32ole
cp C:/ruby-3.0.1/ext/win32ole/lib/win32ole.rb ../../.ext/common
compiling C:/ruby-3.0.1/ext/zlib/zlib.c
zlib.c
linking static-library zlib.lib
ext/extinit.c updated
compiling ext/extinit.c
extinit.c
generating enc.mk
compiling enc/encinit.c
encinit.c
NMAKE : fatal error U1073: don't know how to make 'enc/libenc.lib'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio=
\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\nmake.EXE"' : c=
=F3digo de retorno '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio=
\2017\Community\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\nmake.EXE"' : c=
=F3digo de retorno '0x2'
Stop.

C:\rbuild_x64>
```

I tested at visual studio 2017 and 2019.

**How to reproduce**
``` shell
set PATH=3DC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC=
\Tools\MSVC\14.28.29910\bin\Hostx64\x64;%PATH%
cd C:\rbuild_x64
C:\ruby-3.0.1\win32\configure.bat --with-static-linked-ext
```




-- =

https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=3Dunsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>