Unable to solve error LNK1181

I am not able to get past the following error on Win10. The cl command worked until I installed the Unreal engine. Now I get the following error. Anyone know what I’m missing?


** Visual Studio 2019 Developer Command Prompt v16.1.2
** Copyright © 2019 Microsoft Corporation


d:>cl
Microsoft ® C/C++ Optimizing Compiler Version 19.21.27702.2 for x86
Copyright © Microsoft Corporation. All rights reserved.

usage: cl [ option… ] filename… [ /link linkoption… ]

d:>cl TripleX
Microsoft ® C/C++ Optimizing Compiler Version 19.21.27702.2 for x86
Copyright © Microsoft Corporation. All rights reserved.

cl : Command line warning D9024 : unrecognized source file type ‘TripleX’, object file assumed
Microsoft ® Incremental Linker Version 14.21.27702.2
Copyright © Microsoft Corporation. All rights reserved.

/out:TripleX.exe
TripleX
LINK : fatal error LNK1181: cannot open input file ‘TripleX.obj’

I solved this but no exactly sure which fixed it. First, I noticed that I was typing “cl TripleX” when I should have been typing “cl TripleX.cpp”. I think this corrected the obj file creation. Then I went back an changed the Unreal engine to what is recommended in the video 4.21.# and my current compiles seem to be working correctly.

cl is completely unrelated to Unreal, the engine you have installed should have no effect on cl.

cl TripleX

would be trying to compile the file “TripleX” with no file extension, so it instead assumed you meant to do

cl TripleX.obj

But that file doesn’t exist so this is why you got
“LINK : fatal error LNK1181: cannot open input file ‘TripleX.obj’”

3 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms