Thread: Link on Windows to output an exe "Could not open uuid.lib"

  1. #1
    Registered User
    Join Date
    Sep 2019
    Posts
    12

    Link on Windows to output an exe "Could not open uuid.lib"

    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.
    Last edited by Salem; 09-14-2019 at 09:57 PM. Reason: Removed yet more crayola

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    You need to stop getting all creative with all the font style and size abuse.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Sep 2019
    Posts
    12
    I see the top part of this post shifted to the right but I don't see any strange colors or font sizes. I'm new here and I don't understand why that's happening. How are you able to edit it?

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    > I see the top part of this post shifted to the right but I don't see any strange colors or font sizes.
    That's because I edited it.

    > I'm new here and I don't understand why that's happening.
    It happens because your IDE and or browser try to be helpful by copying across a whole load of formatting along with your text.
    So rather than ctrl-c/ctrl-v, look for either "Copy as text" in your IDE, or "Paste as text" in your browser.

    > How are you able to edit it?
    Because I'm a moderator here.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Sep 2019
    Posts
    12
    Thanks very much for the formatting tips. I just posted a new question because this issue has changed. It's at Windows Link.exe error LNK2019 unresolved external symbol and it looks like it's formatted correctly.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 12-23-2012, 04:52 AM
  2. LINK : fatal error LNK1104: cannot open file "nafxcwd.lib"
    By kandas.soft in forum C++ Programming
    Replies: 5
    Last Post: 07-26-2011, 03:15 AM
  3. Windows' "Open with" option...?
    By \007 in forum Windows Programming
    Replies: 8
    Last Post: 01-18-2011, 05:24 PM
  4. Windows "Open with dialog box"
    By Adock in forum Tech Board
    Replies: 2
    Last Post: 05-17-2004, 04:45 PM
  5. "CWnd"-"HWnd","CBitmap"-"HBitmap"...., What is mean by "
    By L.O.K. in forum Windows Programming
    Replies: 2
    Last Post: 12-04-2002, 07:59 AM

Tags for this Thread