v
v copied to clipboard
v symlink on Windows 11 broken.
Describe the bug
v symlink causes a compiler error on Windows 11
Reproduction Steps
- Install Parallels on Mac M2
- Install Visual Studio IDE
- Download V
- Unzip into Program Files folder
- cd to Program Files/v
- v symlink
Expected Behavior
Should symlink v
Current Behavior
C:\Program Files>cd v
C:\Program Files\v>v symlink
cannot compile `C:\Program Files\v\cmd\tools\vsymlink`: 1
C:/Users/mike/AppData/Local/Temp/v_0/vsymlink.01JX8CTDWTS0Q0SGHMQFCHGCZD.tmp.c:579: warning: WINVER redefined
C:/Users/mike/AppData/Local/Temp/v_0/C:\Program Files\v\vlib\os\os.c.v:847: warning: implicit declaration of function 'GetFinalPathNameByHandleW'
C:/Users/mike/AppData/Local/Temp/v_0/C:\Program Files\v\vlib\os\os_windows.c.v:395: warning: implicit declaration of function 'CreateSymbolicLinkW'
C:/Users/mike/AppData/Local/Temp/v_0/C:\Program Files\v\cmd\tools\vsymlink\vsymlink_windows.c.v:115: warning: assignment from incompatible pointer type
C:/Users/mike/AppData/Local/Temp/v_0/C:\Program Files\v\cmd\tools\vsymlink\vsymlink_windows.c.v:126: warning: assignment from incompatible pointer type
C:/Users/mike/AppData/Local/Temp/v_0/C:\Program Files\v\cmd\tools\vsymlink\vsymlink_windows.c.v:126: warning: assignment from incompatible pointer type
C:/Users/mike/AppData/Local/Temp/v_0/C:\Program Files\v\cmd\tools\vsymlink\vsymlink_windows.c.v:134: warning: assignment from incompatible pointer type
C:/Users/mike/AppData/Local/Temp/v_0/C:\Program Files\v\cmd\tools\vsymlink\vsymlink_windows.c.v:143: warning: assignment makes integer from pointer without a cast
tcc: error: unrecognized file type
tcc: error: library 'dbghelp' not found
builder error:
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .
Possible Solution
None
Additional Information/Context
No response
V version
V 0.4.10 dbc4071
Environment details (OS name and version, etc.)
| V full version | V 0.4.10 55d004e310048c6f3205e06ce0b41a94cc4e95af.dbc4071 |
|---|---|
| OS | windows, |
| Processor | 4 cpus, 64bit, little endian, N/A |
| Memory | 1.81GB/3.99GB |
| V executable | C:\Program Files\v\v.exe |
| V last modified time | 2025-06-03 09:59:20 |
| V home dir | contains spaces, value: C:\Program Files\v |
| VMODULES | OK, value: C:\Users\mike.vmodules |
| VTMP | OK, value: C:\Users\mike\AppData\Local\Temp\v_0 |
| Current working dir | contains spaces, value: C:\Program Files\v |
| Git version | N/A |
| V git status | N/A |
| .git/config present | false |
| cc version | N/A |
| gcc version | N/A |
| clang version | N/A |
| msvc version | N/A |
| tcc version | tcc version 0.9.27 (x86_64 Windows) |
| tcc git status | N/A |
| emcc version | N/A |
| glibc version | N/A |
[!NOTE] You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.
Connected to Huly®: V_0.6-23032
v up also fails:
C:\Program Files\v>v up
Updating V...
> git_command: git init
> git_command: git remote add origin https://github.com/vlang/v
> git_command: git fetch
> git_command: git remote set-head origin master
> git_command: git reset --hard origin/master
> git_command: git clean -xfd --exclude /thirdparty/tcc/ --exclude /v --exclude /v.exe --exclude /cmd/tools/vup --exclude /cmd/tools/vup.exe
> backing up `cmd/tools/vup.exe` to `cmd/tools/vup.exe_old.exe` ...
> `"C:\Program Files\v\v.exe" self` failed, running `make`...
> running make ...
> done running make.
> Recompiling vup.v ...
> Failed recompiling vup.v .
C:/Users/mike/AppData/Local/Temp/v_0/vup.01JX8DCDZRG81ETA25TM7N6EV5.tmp.c:577: warning: WINVER redefined
C:/Users/mike/AppData/Local/Temp/v_0/C:\Program Files\v\vlib\os\os.c.v:847: warning: implicit declaration of function 'GetFinalPathNameByHandleW'
tcc: error: unrecognized file type
tcc: error: library 'dbghelp' not found
builder error:
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .
Current V version: V 0.4.10 cecbc72, timestamp: 2025-06-08 13:02:33 +0300
tcc have problems with whitespace in paths on Windows traditionally
C:\Users\mike\Documents\v>v -cc gcc symlink
cannot compile `C:\Users\mike\Documents\v\cmd\tools\vsymlink`: 1
C:/Users/mike/AppData/Local/Temp/v_0/vsymlink.01JX8FYHDR59H5RXY32MXNKAW2.tmp.c:579: warning: WINVER redefined
C:/Users/mike/AppData/Local/Temp/v_0/C:\Users\mike\Documents\v\vlib\os\os.c.v:847: warning: implicit declaration of function 'GetFinalPathNameByHandleW'
C:/Users/mike/AppData/Local/Temp/v_0/C:\Users\mike\Documents\v\vlib\os\os_windows.c.v:395: warning: implicit declaration of function 'CreateSymbolicLinkW'
C:/Users/mike/AppData/Local/Temp/v_0/C:\Users\mike\Documents\v\cmd\tools\vsymlink\vsymlink_windows.c.v:115: warning: assignment from incompatible pointer type
C:/Users/mike/AppData/Local/Temp/v_0/C:\Users\mike\Documents\v\cmd\tools\vsymlink\vsymlink_windows.c.v:126: warning: assignment from incompatible pointer type
C:/Users/mike/AppData/Local/Temp/v_0/C:\Users\mike\Documents\v\cmd\tools\vsymlink\vsymlink_windows.c.v:126: warning: assignment from incompatible pointer type
C:/Users/mike/AppData/Local/Temp/v_0/C:\Users\mike\Documents\v\cmd\tools\vsymlink\vsymlink_windows.c.v:134: warning: assignment from incompatible pointer type
C:/Users/mike/AppData/Local/Temp/v_0/C:\Users\mike\Documents\v\cmd\tools\vsymlink\vsymlink_windows.c.v:143: warning: assignment makes integer from pointer without a cast
tcc: error: unrecognized file type
tcc: error: library 'dbghelp' not found
builder error:
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .
Same problem with -cc msvc
https://learn.microsoft.com/en-us/windows/win32/debug/debug-help-library
At most, V could check for the DLL and give you a message telling you to install it.
Installed Windows 10 and 11 SDKs. Still broken. Running from the VsDevCmd.bat prompt. I forgot how sad Windows dev is.
I think the title is a little misleading. Nothing is wrong with v symlink if you are on Windows x64.
From my point of view, the questions to ask are:
- Does V support Windows ARM?
- Does TCC support Windows ARM?
He's doing this in Parallels, which is a Windows emulator on Mac. Said it fails the same way with -cc msvc, so not tcc related.
The problem is that V can't find dbghelp.dll (as shown in the error messages), which is apparently a "hidden" dependency on Windows.
I'm sorry, but your answer doesn't make sense to me.
He's doing this in Parallels, which is a Windows emulator on Mac.
I have a problem because I use Parallels, but users who use native Windows have no problem !!??
Said it fails the same way with -cc msvc, so not tcc related.
did you see this
C:\Users\mike\Documents\v>v -cc gcc symlink
...
tcc: error: unrecognized file type
tcc: error: library 'dbghelp' not found
If it failed in the same way, then it is a TCC problem.
Yes, there could very well be a difference between Windows on hardware and Windows in Parallels.
And he has this note as well:
"Same problem with -cc msvc"
Which means although it is a problem with tcc, it is also a problem with msvc, meaning it is NOT specific to tcc.
Again, the 2nd error line you pasted shows at least one real problem:
tcc: error: library 'dbghelp' not found
I don't get this, if msvc was found and used at that time, no tcc error should be displayed here, right?
@mike-ward Can you check which version of Windows is installed when using Parallels? x64, x86, arm ?
tcc was found and used because it was the default. He said "Same problem with -cc msvc" which means he tried again by adding the -cc msvc option on the command line, but he only pasted the output from running with tcc. If the error was the same with both, the only difference in the error messages would've been the name of the compiler used.
If msvc was found and used, I doubt the problem is the same. But we are assuming a lot here, so only @mike-ward can shed some light on this.
Reading back over all the comments, it is looking like neither gcc nor msvc were found, so V fell back to tcc when compiling. And, as @larpon mentioned in https://github.com/vlang/v/issues/24675#issuecomment-2954224320 tcc doesn't like spaces in paths... or perhaps V isn't quoting them properly. No idea on that.
@mike-ward please move your V install to a path with no spaces, and see if that helps.
If the problem is still that dbghelp.dll isn't being found, perhaps make sure that is also installed in a path with no spaces.
I thought the space issue was already solved some time ago and I literally tried it on my computer and it's not a problem for me, but yeah, maybe some weird side effects, but ... I'm skeptical that this will solve the problem.
I thought the space issue was already solved some time ago
Me too. Sometimes computers and software is just not in the state we assume - which was why I thought it maybe was useable information in this context. It could, of course, be other issues for sure :)
As the saying goes, “you've seen horses puke”, so, yes ... many things are possible. But what really bothers me is this line
tcc: error: unrecognized file type
That doesn't really fit somehow. What did tcc get and doesn't think it can do anything with it? Hence the suspicion of different architectures such as arm vs. x64 or x86.