I am currently a student and my coursework for one of my modules is about graphics programming. We have been given the framework for it and each week learning a new concept and implementing it.
This all works fine when working on the lab computers however i'm trying to do work from my macbook and it is given me a whole lotta warnings/errors.
I've looked online to find out how to link directories using cmake and I THINK i've got this part correct.
cmake_minimum_required(VERSION 3.8)
project(GraphicsProgramming_Lab3)
CMAKE_CXX_STANDARD
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.8")
IF(APPLE)
INCLUDE_DIRECTORIES ( /System/Library/Frameworks )
FIND_LIBRARY(GLUT_LIBRARY GLUT )
FIND_LIBRARY(OpenGL_LIBRARY OpenGL )
MARK_AS_ADVANCED (
GLUT_LIBRARY
OpenGL_LIBRARY)
SET(EXTRA_LIBS ${GLUT_LIBRARY} ${OpenGL_LIBRARY})
ENDIF (APPLE)
set(SOURCE_FILES main.cpp Scene.cpp Scene.h Input.cpp Input.h Vector3.cpp Vector3.h)
add_executable(GraphicsProgramming_Lab3 ${SOURCE_FILES})
target_link_libraries(GraphicsProgramming_Lab3 ${GLUT_LIBRARY})
However when I look through my code I can see alot of the functions have a line scored through them and when I highlight them it's telling me they have deprecated.
Compiler giving me this message when trying to build:
-- Configuring done
-- Generating done
-- Build files have been written to:
/Users/leekellie/CLionProjects/GraphicsProgramming_Lab3/cmake-build-debug
[ 40%] Building CXX object
CMakeFiles/GraphicsProgramming_Lab3.dir/main.cpp.o
[ 40%] Building CXX object
CMakeFiles/GraphicsProgramming_Lab3.dir/Scene.cpp.o
[ 60%] Building CXX object
CMakeFiles/GraphicsProgramming_Lab3.dir/Input.cpp.o
[ 80%] Building CXX object
CMakeFiles/GraphicsProgramming_Lab3.dir/Vector3.cpp.o
[100%] Linking CXX executable GraphicsProgramming_Lab3
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum
deployment target of OS X 10.9 [-Wdeprecated]
Undefined symbols for architecture x86_64:
and a bunch of other messages regarding the functions i'm using, here is one, they are all very similar:
"_glBegin", referenced from:
Scene::render() in Scene.cpp.o
Scene::render() in Input.cpp.o
"_glClear", referenced from:
Scene::render() in Scene.cpp.o
Scene::render() in Input.cpp.o
"_glClearColor", referenced from:
Scene::Scene(Input*) in Scene.cpp.o
Scene::Scene(Input*) in Input.cpp.o
Not really sure what I can do about this (first time ive ever used openGL & GLUT and first time using a mac to do my coursework on).
Any help appreciated, thanks.