Search code examples
c++windowsvisual-studiofltkwindows-11

How to use fltk graphic library with visual studio (community) 2022 for C++ project on Windows 11 PC


I have tried downloading the files from the website and try using it directing it but it needs to be compile or generated i guess. I am new to learning C++ and fltk graphic library. Thanks in advance


Solution

  • Yes!!! I finally got it.

    Step 1

    • I install vcpkg, follow the instructions and integrate with visual studio.
    • Then I download fltk using vcpkg: vcpkg install fltk.

    Step 2

    • Finally in Visual Studio, Linker>>General>>Additional Library Directories : refer to the lib folder which vcpkg produced during installation.
    • And C/C++>>General>>Additional Include Directories: refer to the include folder from vcpkg.

    That's it. I hope other newbies like me could save many hours. Thanks!

    Note: I tried uploading a screenshot for proof but need at least 10 reputations!