Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows build link error #28122

Closed
Tatsujinichi opened this issue Mar 31, 2024 · 5 comments · Fixed by #28173
Closed

Windows build link error #28122

Tatsujinichi opened this issue Mar 31, 2024 · 5 comments · Fixed by #28173
Labels
bug issues reporting wrong behavior build building and installing Neovim using the provided scripts platform:windows
Milestone

Comments

@Tatsujinichi
Copy link

Problem

Get a link error,
While trying to build for windows, following instructions at:
https://github.com/neovim/neovim/blob/master/BUILD.md#building-on-windows

...
[385/421] Linking C executable bin\nvim.exe
FAILED: bin/nvim.exe lib/nvim.lib
C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=src\nvim\CMakeFiles\nvim_bin.dir --rc=C:\PROGRA2\WI3CF21\10\bin\1002201.0\x86\rc.exe --mt=C:\PROGRA2\WI3CF21\10\bin\1002201.0\x86\mt.exe --manifests D:\dev\neovim\src\nvim\os\nvim.manifest -- C:\PROGRA1\MICROS2\2022\COMMUN1\VC\Tools\MSVC\14381.331\bin\Hostx86\x86\link.exe /nologo @CMakeFiles\nvim_bin.rsp /out:bin\nvim.exe /implib:lib\nvim.lib /pdb:bin\nvim.pdb /version:0.0 /machine:X86 /INCREMENTAL:NO /subsystem:console /INCREMENTAL:NO /LTCG && cd ."
LINK: command "C:\PROGRA1\MICROS2\2022\COMMUN1\VC\Tools\MSVC\14381.331\bin\Hostx86\x86\link.exe /nologo @CMakeFiles\nvim_bin.rsp /out:bin\nvim.exe /implib:lib\nvim.lib /pdb:bin\nvim.pdb /version:0.0 /machine:X86 /INCREMENTAL:NO /subsystem:console /INCREMENTAL:NO /LTCG /MANIFEST:EMBED,ID=1 /MANIFESTINPUT:D:\dev\neovim\src\nvim\os\nvim.manifest" failed (exit code 1120) with the following output:
Creating library lib\nvim.lib and object lib\nvim.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
math.c.obj : error LNK2001: unresolved external symbol __BitScanForward64
bin\nvim.exe : fatal error LNK1120: 1 unresolved externals
ninja: build stopped: subcommand failed.
...

full log is too long to paste here

Steps to reproduce

VsDevCmd.bat -arch=x64
cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE=Release
cmake --build .deps --config Release
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=Release
cmake --build build --config Release

Expected behavior

expected to build fully

Neovim version (nvim -v)

source

Vim (not Nvim) behaves the same?

not building vim

Operating system/version

windows 10 pro

Terminal name/version

powershell

$TERM environment variable

not important

Installation

not installed

@Tatsujinichi Tatsujinichi added the bug issues reporting wrong behavior label Mar 31, 2024
@zeertzjq
Copy link
Member

Operating system/version

windows 10 pro

Can you provide a more exact version?

@zeertzjq zeertzjq added build building and installing Neovim using the provided scripts platform:windows labels Mar 31, 2024
@Tatsujinichi
Copy link
Author

Sorry

Edition Windows 10 Pro
Version 22H2
Installed on ‎1/‎13/‎2024
OS build 19045.4170
Experience Windows Feature Experience Pack 1000.19054.1000.0

@Tatsujinichi
Copy link
Author

powershell version

PS D:\dev\neovim> $PSVersiontable

Name Value


PSVersion 5.1.19041.4170
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.4170
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

@Tatsujinichi
Copy link
Author

PS D:\dev\neovim> cmake --version
cmake version 3.29.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).
PS D:\dev\neovim> ninja --version
1.11.1
PS D:\dev\neovim>

@Tatsujinichi
Copy link
Author

-- The C compiler identification is MSVC 19.38.33135.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior build building and installing Neovim using the provided scripts platform:windows
Projects
Development

Successfully merging a pull request may close this issue.

2 participants