Git Product home page Git Product logo

install-glfw-windows-cpp's Introduction

Guide to install GLFW on Windows for C++

GLFW logo C++ logo Windows logo

Instructions

  • Make sure you have installed the compiler that you will use for C++, in my case I will use MinGW.

    Install MinGW on Windows

    Download the installer here

    I recommend you watch this video where they explain how to install it:

    Alt text

  • Now install CMake, you can download the installer here or check the download page.

    When you finish installing CMake make sure the path is found in the environment variables.

    If you like to use the terminal you can use the following command to open the system properties window:

    PS C:\> start sysdm.cpl

    When the system properties window opens, click on the advanced options tab and then click on environment variables. Check in system variables > Path that the following path is found:

    C:\Program Files\CMake\bin
    

Download GLFW

In this installation guide I will show you how to install GLFW from the source package, to download the source package click here.

Install GLFW

When the download is finished, unzip the folder in the path you want, for example on the desktop. Once the file is unzipped open the terminal in administrator mode.

Run as administrator

In the terminal go to the path where to unzip the file

PS C:\path\to\glfw-version>

Once we are in the folder path we will use CMake, using the following commands:

PS C:\path\to\glfw-version> cmake . -G "MinGW Makefiles"
PS C:\path\to\glfw-version> cmake --build .

Before proceeding with the installation make sure to create the folder in the following path:

C:\Program Files (x86)\GLFW\include\GLFW

When you make sure that the path exists you can install using the following command:

PS C:\path\to\glfw-version> cmake --install . --default-directory-permissions u=rwx

Run Example code

Now you can run the Example code from the GLFW documentation using CMake, check the CMakeLists file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.