yaml-cpp vs2022 link2001 error

xulu zhao 66 Reputation points

I'm sure my configuration is correct, but why is there still a link error?

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,450 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Guido Franzke 2,201 Reputation points

    you must add the yaml library to your linker setting. Check the libraries that you link to your project.
    Edit: read this: how-to-add-additional-libraries-to-visual-studio-project
    Regards, Guido

    0 comments No comments

  2. YujianYao-MSFT 4,266 Reputation points Microsoft Vendor

    Hi @xulu zhao ,

    This official document explains how to use the DLL, I recommend you to read it carefully.

    And you should add #pragma comment(lib, ".lib") in your code.

    Best regards,


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.