yaml-cpp vs2022 link2001 error

xulu zhao 66 Reputation points
2022-07-12T13:17:43.65+00:00

219846-vd63zfn7-yln9wz.png219882--3el5h-m04x0ss4ktlj.png219923-u8eo4mf-tvz490kqnp8rqe.png
I'm sure my configuration is correct, but why is there still a link error?

C++
C++
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
    2022-07-12T13:35:38.097+00:00

    Hello,
    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
    2022-07-13T01:22:00.743+00:00

    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,

    Elya


    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.