I have compiled the following C code to an obj. I linked with LLVM's lld-link to create an exe on Windows. LLVM's lld-link is modelled on Microsoft's link.exe and uses the same command-line options. But when I link I get this error:
Code:
"Could not open uuid.lib: no such file or directory"
The C code (SxSv.c):
Code:
#include "SxSv.h"
int loadDLL()
{
int status = 0;
TestFunc _TestFunc;
HINSTANCE testLibrary = LoadLibrary("SxSv.dll");
if (testLibrary) {
_TestFunc = (TestFunc) GetProcAddress(testLibrary, "SSXV");
if (_TestFunc) {
status = _TestFunc();
}
FreeLibrary(testLibrary);
}
return status;
}
The header file (SxSv.h):
Code:
#ifndef DLLHANDLER_C_
#define DLLHANDLER_C_
#include <windows.h>
#include <winbase.h>
#include <windef.h>
#include <stdio.h>
typedef int (*TestFunc)(int);
int loadDLL( void );
#endif
The command line string:
Code:
lld-link SxSv SxSv.obj
I found many uuid.lib files on my computer; added a LIBPATH to the command line string using the latest uuid.lib, but it didn't help:
Code:
lld-link SxSv /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\Lib\10.0.17763.0\um\x64\" SxSv.obj
How do I designate the location of uuid.lib, or can I link this without uuid.lib?
Thanks.