Skip to content

Installation and Linking

Noah Gallo edited this page Mar 12, 2023 · 2 revisions

Installation

Before getting started, there a few libraries that need to be installed and linked to your project. I will go over the the process for getting started here.

** This Library uses the ISO C++ 20 Standard **

In order to setup OpenGL, you will need to make sure to include all the necessary OpenGL Libraries and header files.

Required Libraries

You can download the header files from their websites, or check the include directory of this repository ('./resources/include') which contains all the necessary header files for compilation.

While GLM only needs the header files, you will need a device specific binary for GLFW library. You can get this either by finding the specific binarie on their website, or by building it yourself using the GLFW source.

After you've collected those, you also need to build the binaries for my library. Simply clone the branch, open in visual studio and build. If you don't use Visual Studio, you will have to build it manually with whatever C++ build mechanism you prefer. (you may have to do both a debug build and a release build). You will need to grab the Graphics Engine header as well.

Once you have the header files and binaries, simply put them into seperate files and include them in your project.

In my demo app, I have an 'include' folder for header files and a 'libraries' folder for the library binaries

Using Visual Studio you can do this in the projects setting window (Make sure to do this in debug and release)

  1. Add the include folder path to the "VC++ Directories -> Include Directories" string
  2. Add you library folder path to the "VC++ Directories -> Library Directories" string
  3. Add 'GraphicsEngine.lib;opengl32.lib;glfw3.lib;' to the "Linker -> Input -> Additional Dependencies" string

After linking the projects, you should be able to use the library as intended.

If you run into issues linking the project, check out my demo applications project properties and make sure yours match. If you continue to have problems, go to LearnOpenGL. He goes over the OpenGL setup in more detail.

Clone this wiki locally