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.
Hello @Sid Kraft ,
Thanks for your question.
Tools like vcpkg automatically put files into the standard folders that Visual Studio always checks. Because you downloaded the files manually and placed them in C:\glfw-3.4\Include\GLFW, Visual Studio does not know they are there. It is only looking in its default locations.
It requires two main phases: telling Visual Studio where your Header files (.h) are, and telling it where your Library files (.lib) are. You can refer to the following steps:
Phase 1: Add the include directory
- Open project properties.
- Open your project in Visual Studio.
- Look at the Solution Explorer panel on the right side of your screen.
- Right-click on your Project's name (the name of your specific project, not the Solution at the very top) and select Properties at the bottom of the menu.
- Add the include directory.
- At the top of the Properties window, make sure Configuration is set to
All Configurationsand Platform is set toAll Platforms. - On the left menu, expand C/C++ and click on General.
- On the right side, find the line that says
Additional Include Directories. - Click the dropdown arrow on the far right of that row, select <Edit...> and type in your exact path:
C:\glfw-3.4\Include\GLFW. - Click OK, then Apply
Phase 2: Add the library directory (for your .lib files)
To actually run OpenGL, Visual Studio also needs the compiled library files that came with your download.
- Point to the folder.
- Still in the Properties window, expand Linker on the left menu and click on General.
- On the right side, find
Additional Library Directories. - Click the dropdown, select
<Edit...>and add the path to the folder containing your .lib files. (Note: In your GLFW download folder, this is usually a folder named something like lib-vc2022 or lib-mingw, depending on your version). - Click Apply.
- Specify the file.
- Under the Linker menu on the left, click on Input.
- On the right side, find
Additional Dependencies. - Click the dropdown, select
<Edit...>and type in the exact name of the library file:glfw3.lib - Press Enter to go to a new line, and also type:
opengl32.lib. - Click OK.
I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback.