2012-07-28 3 views
1

OpenGL을 배우고 openglbook.com을 참조로 사용하려고합니다. 내 컴퓨터에서 작동하도록 GLEW와 freeglut을 얻으려고 노력 중이므로 Visual Studio로 작업하게하려면 다음 단계를 거쳐야합니다. http://openglbook.com/setting-up-opengl-glew-and-freeglut-in-visual-c. 나는 편지에 그것을 따르고 있고 유일한 차이점은 Visual Studio 2010 Ultimate을 사용하고 있다는 것입니다.VS2010, 링커 오류로 작동하는 GLEW를 가져올 수 없습니다.

GLEW를 사용하려고하면 문제가 발생합니다. 이 경우 링커 오류가 발생합니다. 오류 메시지의 전체 텍스트는 다음과 같습니다.

1>------ Build started: Project: gl1, Configuration: Debug Win32 ------ 
1>Build started 2012/07/28 20:12:19. 
1>InitializeBuildStatus: 
1> Touching "Debug\gl1.unsuccessfulbuild". 
1>ClCompile: 
1> All outputs are up-to-date. 
1>ManifestResourceCompile: 
1> All outputs are up-to-date. 
1>main.obj : error LNK2019: unresolved external symbol [email protected] referenced in function _Initialize 
1>main.obj : error LNK2019: unresolved external symbol [email protected] referenced in function _Initialize 
1>c:\users\magpie\documents\visual studio 2010\Projects\gl1\Debug\gl1.exe : fatal error LNK1120: 2 unresolved externals 
1> 
1>Build FAILED. 
1> 
1>Time Elapsed 00:00:00.84 
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 

어떤 도움이 필요합니까? 처음이 오류가 발생했을 때 나는 소스에서 GLEW를 컴파일 해 보았습니다.하지만 그 중 하나를 고치지 않았습니다 (제대로했다고 가정).

답변

2

이 오류는 컴파일러가 헤더 파일에 설명 된 메서드 구현을 찾을 수 없음을 의미합니다. 응용 프로그램에서 GLEW를 정적으로 컴파일하려면 라이브러리 검색 디렉토리 (프로젝트 속성 -> VC 검색 디렉토리)에 glew32.lib 파일을 추가합니다.

관련 문제