How to Link with .lib file -- UuidCreate()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JoderCoder
    New Member
    • Feb 2008
    • 18

    #1

    How to Link with .lib file -- UuidCreate()

    I am getting this error when i attempt to use UuidCreate( &uuid );

    LNK2019: unresolved external symbol __imp__UuidCrea te@4

    After some googling, i saw i have to link with Rpcrt4.lib

    I am using VS 2003 and not familiar with linking at all.

    1. How do I do linking?
    2. Do I link with .lib file or .dll file?

    Thanks in advance.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    You link with the lib file and need to have the dll present for running.

    Linking is done as part of the Build for you, I am not familiar with VS2003 (I skipped that version) but if you open the project properties or setting you should be able to find a section to alter the linker options and somewhere in there there will be a place to enter additional libraries to link against.

    Comment

    • JoderCoder
      New Member
      • Feb 2008
      • 18

      #3
      Originally posted by Banfa
      You link with the lib file and need to have the dll present for running.

      Linking is done as part of the Build for you, I am not familiar with VS2003 (I skipped that version) but if you open the project properties or setting you should be able to find a section to alter the linker options and somewhere in there there will be a place to enter additional libraries to link against.

      thanks! just found it.. under Configuration Properties->librarian-> Command Line

      and type Rpcrt4.lib in Addition options text box..

      Comment

      Working...