2013-06-06 2 views
0

방금 ​​Windows 8 64 비트가 설치된 새 랩톱을 구입했으며 Visual Studio 2012를 사용하고 있습니다. 3D 파티 용 lib를 설치하는 것과 같은 일반적인 절차를 수행했습니다. PC를 :OpenGL 설정 - 작동하지 않습니다.

  1. 다운로드 freeglut, glew, glfw, 과잉,에
  2. 복사 헤더 SDL : "에
  3. 복사 libs와"C는 \ Program 파일 (x 86) \ 마이크로 소프트 비주얼 스튜디오 11.0 \ VC \ 포함 " C : \ Program Files (x86) \ Microsoft Visual Studio 11.0 \ VC \ lib "
  4. dll이"C : \ Wind "로 복사됩니다. ows \ SysWOW64 "

그렇다면 다른 PC에서 개발 한 프로젝트 (Windows 8 32 비트에서 개발되었지만 중요성이있는 경우)를 다운로드하면 컴파일되지 않습니다. 컴파일러에서 다음과 같은 연결 오류가 발생했습니다.

Error 1 error LNK2001: unresolved external symbol [email protected] - about 50 of these 

Error 63 error LNK2019: unresolved external symbol [email protected] - again about 50 of these 

프로젝트가 내 기존 PC에서 완벽하게 작동합니다.

나는 간단한 새 프로젝트를 만들려고 않았다 http://pastebin.com/GfEieL6f

다음 라이브러리 링크 (속성 -> 링커 -> 입력 -> 추가 종속성)

opengl32.lib 
glut32.lib 
glu32.lib 

그리고 다시 컴파일되지 것을 , 다시 동일한 연결 오류 :

Error 1 error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl drawcube(void)" (?drawcube@@YAXXZ) P:\OpenGL_Setup\OpenGL_Setup\opengl_setup.obj 

Error 2 error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl drawcube(void)" ([email protected]@YAXXZ) P:\OpenGL_Setup\OpenGL_Setup\opengl_setup.obj 

Error 3 error LNK2019: unresolved external symbol [email protected] referenced in function _main P:\OpenGL_Setup\OpenGL_Setup\opengl_setup.obj 

Error 4 error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl drawcube(void)" ([email protected]@YAXXZ) P:\OpenGL_Setup\OpenGL_Setup\opengl_setup.obj 

Error 5 error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl drawcube(void)" ([email protected]@YAXXZ) P:\OpenGL_Setup\OpenGL_Setup\opengl_setup.obj 

Error 6 error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl drawcube(void)" ([email protected]@YAXXZ) P:\OpenGL_Setup\OpenGL_Setup\opengl_setup.obj 

Error 7 error LNK2019: unresolved external symbol [email protected] referenced in function _main P:\OpenGL_Setup\OpenGL_Setup\opengl_setup.obj 

Error 8 error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl drawcube(void)" ([email protected]@YAXXZ) P:\OpenGL_Setup\OpenGL_Setup\opengl_setup.obj 

Error 9 error LNK2019: unresolved external symbol [email protected] referenced in function _main P:\OpenGL_Setup\OpenGL_Setup\opengl_setup.obj 

Error 10 error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl drawcube(void)" ([email protected]@YAXXZ) P:\OpenGL_Setup\OpenGL_Setup\opengl_setup.obj 

Error 11 error LNK2019: unresolved external symbol [email protected] referenced in function "void __cdecl drawcube(void)" ([email protected]@YAXXZ) P:\OpenGL_Setup\OpenGL_Setup\opengl_setup.obj 

내가 뭔가를 놓치고 있는지, 나에게 몇 가지 아이디어를 줄 수 있습니까?

PP : 간단한 프로그램을 수정하고 실행했지만 이전 프로젝트를 실행할 수 없습니다. 플랫폼 변경으로 인해 문제 일 수 있습니까? 어떻게 해결할 수 있습니까?

+0

가 먼저 오지 말아야합니까? – Kevin

+0

그래, 먼저 glut에 연결해 보자. – Xale

답변

2
  1. 컴파일러 lib 디렉토리에 파일을 추가하지 마십시오. 대신 다른 라이브러리 검색 경로를 프로젝트에 추가하십시오.

  2. 아마도 VC++ 2012 및 프로젝트 빌드 설정과 호환되지 않는 라이브러리 파일을 다운로드했을 것입니다. 원시 코드에서는 x86, x64 등을 혼합 할 수 없습니다. 정적 라이브러리는 OS가 아닌 프로젝트 비트와 일치해야합니다. 또한 Microsoft는 라이브러리 파일 형식과 라이브러리에서 사용하는 런타임 라이브러리 구성 요소를 변경/확장하므로 실제로 VC++ 버전 용으로 설계된 라이브러리 파일을 가져와야합니다.

+0

내 경우에는 opengl32.lib와 링크 만하면된다. – CroCo

관련 문제