function name mangle when create 32bit dll #23689
Labels
Bug
This tag is applied to issues which reports bugs.
OS: Windows
Bugs/feature requests, that are specific to Windows OS.
Unit: cgen
Bugs/feature requests, that are related to the default C generating backend.
Describe the bug
When create a 32bit dll with MSVC, export function names were mangled, for example
in c code,
func
function name will become_func
or_func@8
Reproduction Steps
code.v
open the generated
code.def
file.Expected Behavior
open the generated
code.def
file. show :Current Behavior
open the generated
code.def
file. show :Possible Solution
generate a
temp.def
which contain export function names, then append a/DEF
to the.rsp
file... /DEF:"D:\v\bug\shared\temp.def"
Additional Information/Context
-m32
is skipped bymsvc
.V version
V 0.4.9 f9d3bd3
Environment details (OS name and version, etc.)
V full version
V 0.4.9 f9d3bd3
OS
windows, Microsoft Windows 10 企业版 LTSC 19044 64 位
Processor
16 cpus, 64bit, little endian, AMD Ryzen 7 7840H with Radeon 780M Graphics
Memory
14.91GB/27.69GB
V executable
D:\v\v\v\v.exe
V last modified time
2025-01-20 00:57:58
V home dir
OK, value: D:\v\v\v
VMODULES
OK, value: C:\Users\DDT.vmodules
VTMP
OK, value: C:\Users\DDT\AppData\Local\Temp\v_0
Current working dir
OK, value: D:\v\bug\shared
Git version
git version 2.43.0.windows.1
V git status
weekly.2025.03-5-gf9d3bd39-dirty (107 commit(s) behind V master)
.git/config present
true
cc version
N/A
gcc version
N/A
clang version
N/A
msvc version
用于 x86 的 Microsoft (R) C/C++ 优化编译器 19.39.33523 版
tcc version
tcc version 0.9.28rc 2024-12-30_mob@68000c01* (x86_64 Windows)
tcc git status
N/A
emcc version
N/A
glibc version
N/A
The text was updated successfully, but these errors were encountered: