2011-04-22 2 views
5

내가 비주얼 스튜디오 2010에서 프로젝트를 컴파일하려고, 엑스 코드에서 오는하고, 나는 다음과 같은 오류 얻을 :해결되지 않은 외부 기호 2010

2>ofxCLeye.obj : error LNK2019: unresolved external symbol "struct _GUID __cdecl CLEyeGetCameraUUID(int)" ([email protected]@[email protected]@[email protected]) referenced in function "public: static int __cdecl ofxCLeye::listDevices(void)" ([email protected]@@SAHXZ) 
2>ofxCLeye.obj : error LNK2019: unresolved external symbol "int __cdecl CLEyeGetCameraCount(void)" ([email protected]@YAHXZ) referenced in function "public: static int __cdecl ofxCLeye::listDevices(void)" ([email protected]@@SAHXZ) 
2>ofxCLeye.obj : error LNK2019: unresolved external symbol "bool __cdecl CLEyeCameraGetFrameDimensions(void *,int &,int &)" ([email protected]@[email protected]) referenced in function "public: void __thiscall ofxCLeye::grabFrame(void)" ([email protected]@@QAEXXZ) 
2>ofxCLeye.obj : error LNK2019: unresolved external symbol "bool __cdecl CLEyeCameraGetFrame(void *,unsigned char *,int)" ([email protected]@[email protected]) referenced in function "public: void __thiscall ofxCLeye::grabFrame(void)" ([email protected]@@QAEXXZ) 
2>ofxCLeye.obj : error LNK2019: unresolved external symbol "bool __cdecl CLEyeDestroyCamera(void *)" ([email protected]@[email protected]) referenced in function "public: virtual void __thiscall ofxCLeye::close(void)" ([email protected]@@UAEXXZ) 
2>ofxCLeye.obj : error LNK2019: unresolved external symbol "bool __cdecl CLEyeCameraStop(void *)" (?CLEyeCame[email protected]@[email protected]) referenced in function "public: virtual void __thiscall ofxCLeye::close(void)" ([email protected]@@UAEXXZ) 
... etc etc... 
2>bin\clEye_debug.exe : fatal error LNK1120: 10 unresolved externals 

내가 컴파일러가 을 연결하려고 상상을 CLEyeMulticam.lib하지만 찾지 못했습니다. 나는 그것을 올바르게 설정했다고 생각한다.

VS2010에 라이브러리를 포함하는 데 필요한 단계를 알려주십시오.

은 프로젝트의 속성 페이지에서

마크

+0

'CLEyeMulticam.lib' 파일은 주위에 거짓말을하고 있거나 VS2010에 의해 만들어져 있어야합니까? – quamrana

답변

10

지나치게 과격한 경우 사과드립니다. \ SRC \ : 이것은 사전 구축 된 라이브러리 (프로젝트/솔루션의 일부로 내장되지 않음) 후 반드시

a) #include the correct header 
b) #define any requisite macros 
c) speciy additional .lib dependencies as shown below. 

enter image description here

당신은 완전히 유자격 경로를 지정해야합니다 (D을 인 경우 project \ libs \ camera.lib). libar 파일이 LIB 환경 변수에없는 경우.

+0

+1 : libs 디렉토리를 추가 포함 디렉토리에 추가하거나, 등록 정보 시트와 함께 경로를 추가하거나, 환경 변수와 함께 경로를 추가하거나, 프로젝트 디렉토리의 상대 경로를 사용하는 경우 경로를 정규화 할 필요는 없습니다. – AJG85

+0

정확히 무엇을했는지, 여전히 오류가 발생합니다. 뭔가 다른 것이 틀림 없습니다. 어쨌든 고마워요 – Marc

+1

마크, 도서관에서 C 또는 C++ 인터페이스를 내 보냅니 까? C++ 코드 (예 : API 이름의 경우)를 'C'라이브러리에 연결하려고하면 이름 변환이 링크 오류의 원인이됩니다. 라이브러리 헤더 파일에서 모든 라이브러리 funcitons이 extern "C"{} 블록으로 묶여 있는지 확인하십시오. –

2

, 구성> 링커> 입력으로 이동하여 추가 종속성 설정으로 lib에 파일을 추가, 감사합니다. 이것은 2010 년과 마찬가지로 VC++ 2008에도 적용됩니다.