You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main.cpp use an extern function ttt defined in ttt.cpp, I have following build steps:
use cl compiler to build ttt.obj, hello.obj
use lib to build ttt.lib
use link to link ttt.lib and hello.obj to hello.exe: link /OUT:"hello.exe" ttt.lib /machine:ARM64 hello.obj ttt.obj
the above process was successful.
But if I use lld-link to run the linker command: lld-link /OUT:"hello.exe" ttt.lib /machine:ARM64 hello.obj ttt.obj
It complained that
lld-link: error: duplicate symbol: void __cdecl ttt(void)
>>> defined at ttt.obj
>>> defined at ttt.lib(ttt.obj)
And if I run: lld-link /OUT:"hello.exe" ttt.lib /machine:ARM64 hello.obj
It completed without error.
I think the implementations in ttt.lib and ttt.obj can both exist in the linker command, because ttt is the same one, so lld-link can choose only one, like what Windows link.exe does, is it right?
The text was updated successfully, but these errors were encountered:
Hi, I want to build mariadb using CLANGCL toolset on windows.
How to reproduce the issue:
There are two source files as below:
hello.cpp
ttt.cpp
The main.cpp use an extern function ttt defined in ttt.cpp, I have following build steps:
link /OUT:"hello.exe" ttt.lib /machine:ARM64 hello.obj ttt.obj
the above process was successful.
But if I use lld-link to run the linker command:
lld-link /OUT:"hello.exe" ttt.lib /machine:ARM64 hello.obj ttt.obj
It complained that
And if I run:
lld-link /OUT:"hello.exe" ttt.lib /machine:ARM64 hello.obj
It completed without error.
I think the implementations in ttt.lib and ttt.obj can both exist in the linker command, because ttt is the same one, so lld-link can choose only one, like what Windows link.exe does, is it right?
The text was updated successfully, but these errors were encountered: