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

Locking files during CMake build causing linker errors #237585

Open
sandercox opened this issue Jan 9, 2025 · 1 comment
Open

Locking files during CMake build causing linker errors #237585

sandercox opened this issue Jan 9, 2025 · 1 comment
Assignees

Comments

@sandercox
Copy link

Type: Bug

I'm not exactly sure what is causing this but I and some of my collegues are experiencing issues where our CMake based project has issues trying to link.

Errors like:

LINK : fatal error LNK1168: cannot open PathTo\MyTestDll.dll for writing

We can just hit build again and normally the file then compiles but we have many targets and the issues occurs multiple time before having done a complete build. The process is highly annoying.

I think it's a VS Code issue because

  • it doesn't happen when VS Code is not open and I invoke the compile on commandline
  • it doesn't happen with vscode 1.95.3 (running from an unzipped folder, with the same extensions from my installed 1.96.2 build)
  • it does happen with 1.96.2 (haven't tested other 1.96 releases)
  • it still happens with the Insiders build (running from an unzipped folder)

VS Code version: Code - Insiders 1.97.0-insider (b7b6f26, 2025-01-09T13:17:31.863Z)
OS version: Windows_NT x64 10.0.26100
Modes:

System Info
Item Value
CPUs AMD Ryzen Threadripper 7970X 32-Cores (64 x 4000)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 127.50GB (94.79GB free)
Process Argv --crash-reporter-id 4c4b6a3e-b9e8-407b-ba1b-f3b8c1defad1
Screen Reader no
VM 0%
Extensions (41)
Extension Author (truncated) Version
crates-io Bar 0.7.3
better-phpunit cal 1.6.2
multi-cursor-case-preserve Car 1.0.5
vscode-innosetup cho 1.9.3
vscode-test-explorer-status-bar con 1.2.0
gdb-debug Dam 1.0.7
javascript-ejs-support Dig 1.3.3
gitlens eam 16.1.1
EditorConfig Edi 0.16.4
prettier-vscode esb 11.0.0
vscode-diff fab 2.1.2
dependi fil 0.7.13
cmake-test-adapter fre 0.17.4
copilot Git 1.256.1304
copilot-chat Git 0.24.2025010901
remotehub Git 0.64.0
vscode-github-actions git 0.27.0
vscode-test-explorer hbe 2.22.1
better-cpp-syntax jef 1.27.1
vscode-docker ms- 1.29.3
remote-ssh ms- 0.116.1
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.88.5
azure-repos ms- 0.40.0
cmake-tools ms- 1.19.52
cpptools ms- 1.23.2
hexeditor ms- 1.11.1
live-server ms- 0.4.15
powershell ms- 2024.4.0
remote-explorer ms- 0.4.3
remote-repositories ms- 0.42.0
test-adapter-converter ms- 0.2.1
vsliveshare ms- 1.0.5948
wgsl Pol 0.1.17
vscode-phpunit rec 3.5.16
rust-analyzer rus 0.3.2257
vscode-coverage-gutters rya 2.12.0
tauri-vscode tau 0.2.9
cmake twx 0.0.17
vscode-lldb vad 1.11.1
clang-format xav 1.9.0
@sandercox
Copy link
Author

Personal work around seems to be o locate the work folder outside of workspace adding:

  "cmake.buildDirectory": "${workspaceFolder}/../${workspaceFolderBasename}-build",

to my VSCode settings.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants