Skip to content

환경구축

Juhwi Eden Kim edited this page Oct 19, 2019 · 8 revisions
  1. brew 다운로드
  2. brew install glfw3
  3. brew install glew
  4. GL 폴더와 GLFW 폴더가 /usr/local/include 에 포함되었는지 확인
  5. glm 다운로드 후 압축 풀기
  6. glm 폴더 usr/local/include 에 이동
  7. SOIL2, premake 4 다운로드
  8. premake 압축 풀기
  9. premake 실행파일 SOIL2 폴더에 이동
  10. ./premake4 gmake
  11. cd make/macosx
  12. make미미한 오류 발생 - 무시
  13. src/SOIL2 폴더 usr/local/include 에 이동
  14. lib/libsoil2-debug.a 파일 usr/local 에 이동 (꼭 여기 아니여도 됨)
  15. xcode command line tool c++ 프로젝트 생성
  16. 프로젝트 이름 클릭 후 build settings > search paths > header search paths 에 /usr/local/include 추가
  17. build settings > search paths > library search paths 에 usr/local 추가 (13에서 다른 위치였으면 그 위치로)
  18. build phases > link binary with libraries > '+' > opengl 입력 > OpenGl.framwork > add
  19. '+' > core 입력 > CoreFoundation.framwork > add
  20. '+' > add other > cmd키 + shift키 + G 누르기 > /usr/local/ 입력 > go > Cellar > glew > 버전 폴더 > lib > .dylib(바로가기 화살표 있는 거 말고) > open
  21. '+' > add other > cmd키 + shift키 + G 누르기 > /usr/local/ 입력 > go > Cellar > glfw > 버전 폴더 > lib > .dylib > open
  22. '+' > add other > cmd키 + shift키 + G 누르기 > /usr/local/ 입력 (13의 위치) > go > libsoil2-debug.a > open
  23. xcode 메뉴 product > scheme > edit scheme > use custom working directory 체크박스 선택 > 프로젝트 폴더(main.cpp 위치) 입력

  • 이동할 때 mv 이동대상 이동위치
  • xcode 메뉴 xcode > preference > location > custom paths > '+' 로 HEADER_SEARCH_PATHS 와 LIBRARY_SEARCH_PATHS 직접 추가 가능
  • xcode navigation 두번째 아이콘 > remote > 마우스 우클릭 > add existing repository 로 원격 저장소 설정 가능
  • 이름이 같은 프로젝트 파일을 프로젝트 directory로 옮기면 그 곳에 있는 소스코드로 프로젝트 빌드 가능
  • xcode 메뉴 xcode > preference > source control > git > ignored files 에 gitignore 대신 파일 기입 가능