I am trying to learn opengl for a class but am having trouble with getting setup. I am using Windows, with the IDE CLion, and cygwin64. So far I have been able to compile and run Gl.h and Glu.h but I am having trouble getting the static library for freeglut.
Right now programs error on the last line in the CMakeLists.txt file:
cmake_minimum_required(VERSION 3.5)
project(OpenGLAugust)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(SOURCE_FILES main.cpp)
add_executable(OpenGLAugust ${SOURCE_FILES})
target_link_libraries(OpenGLAugust libopengl32.a libglu32.a libfreeglut.a)
with error
cannot find -lfreeglut
collect2: error: ld returned 1 exit status
I looked into it and it appears that after downloading freeglut I need to create the library files (specifically the .a file libfreeglut32.a) from the source code. I have tried looking for an explanation on how it is done but haven't found an answer. Would anyone be able to help explain how to do this?