未解决的外部符号2010
问题描述:
我从Xcode中来,试图编译在Visual Studio 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 *)" ([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中包含一个库?
谢谢
马克
答
如果这太过于迂腐,请道歉。如果这是一个预建图书馆(未建成的项目/解决方案的一部分),那么要确保
a) #include the correct header
b) #define any requisite macros
c) speciy additional .lib dependencies as shown below.
你需要指定一个完全组队参加道路(d:\ SRC \ project \ libs \ camera.lib),除非该库文件位于LIB环境变量中。
答
在属性页为您的项目中,导航到配置>链接>输入和的lib文件添加到附加依赖设置。这适用于VC++ 2008,可能与2010年相同。
“CLEyeMulticam.lib”文件是否存在或应该由VS2010构建? – quamrana 2011-04-22 15:38:53