[llvm-dev] lld-link.exe Can't Recognize .obj File Type?

Eli Friedman via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 11 11:35:55 PST 2019


lld doesn't care about the file extension; it examines the first few bytes of the file to figure out the filetype.  That error message means that examination failed: the header doesn't correspond to any of the input filetypes lld-link supports.

The Unix "file" utility is generally useful for figuring out what sort of file you're working with.  (On Windows, you can get it through Cygwin or gnuwin32.)

-Eli

From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Osman Zakir via llvm-dev
Sent: Sunday, November 10, 2019 7:58 AM
To: llvm-dev at lists.llvm.org
Subject: [EXT] [llvm-dev] lld-link.exe Can't Recognize .obj File Type?

Hi.

Just now when I tried to compile a .cpp file using the LLVM toolset in VS2019, I got two error messages from lld-link:
"
lld-link : error : Debug\cust_std_lib_facilities.obj: unknown file type
lld-link : error : Debug\Ex10_10.obj: unknown file type
"
What's the reason for this, and is there a way to fix it?  This is the first time I'm saying this error; I've used LLVM before and this error never came up when I know .obj files should've been used then as well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191111/d4cff9aa/attachment.html>


More information about the llvm-dev mailing list