5

Xcodeから来て、Visual Studio 2010でプロジェクトをコンパイルしようとすると、次のエラーが発生します。

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

コンパイラがCLEyeMulticam.libをリンクしようとしていますが、見つかりません。ちゃんと設定できたと思います。

VS2010にライブラリを含めるために必要な手順を教えてください。

ありがとうございました、

マーク

4

2 に答える 2

10

これが過度に衒学的である場合はお詫び申し上げます。これがビルド済みのライブラリ(プロジェクト/ソリューションの一部としてビルドされていない)である場合は、次のことを確認してください

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

ここに画像の説明を入力してください

libaryファイルがLIB環境変数にない限り、完全に修飾されたパス(d:\ src \ project \ libs \ camera.lib)を指定する必要があります。

于 2011-04-22T15:43:30.583 に答える
2

プロジェクトのプロパティページで、[構成]>[リンカー]>[入力]に移動し、libファイルを[追加の依存関係]設定に追加します。これはVC++2008に適用され、おそらく2010にも同様です。

于 2011-04-22T15:38:39.043 に答える