1

Compiling on windows with 6.0.0 or 6.0.1

ld.lld can't find the library in specified path.

This does not work:

ld.lld Source.o -o Executable.exe -L"C:/Users/Username/Documents/" libcode.a

But this does:

ld.lld Source.o -o Executable.exe C:/Users/Username/Documents/libcode.a

Am I doing something wrong here? It works with gnu ld just fine.

SedatedSnail
  • 113
  • 7

1 Answers1

0

-l flag is required, omitting the "lib" prefix and extension.

ld.lld Source.o -o Executable.exe -L"C:/Users/Username/Documents/" -lcode

SedatedSnail
  • 113
  • 7