从另一个类链接到另一个类时出错

时间:2013-10-30 16:22:49

标签: c++ visual-studio-2010 linker

当我尝试使用此代码调用另一个类时,我得到的错误。 这些函数在头文件中定义,头文件包含在类cpp文件和.h文件中。

check_decoder = new decoder_check();
check_decoder->run_CUDA( &g_bFrameStep, &g_bRunning, g_pFrameQueue, g_pVideoDecoder, g_pInteropFrame, g_pCudaModule, &g_bIsProgressive, g_DecodeFrameCount, g_pVideoSource, &g_bUpdateCSC, gfpNV12toARGB, g_KernelSID, g_CtxLock, g_oContext);
free(check_decoder);

错误是

 Creating library F:\projects\decoder_10-18 - Copy\decoderD3D9\Debug\testing_project.lib and object F:\projects\decoder_10-18 - Copy\decoderD3D9\Debug\testing_project.exp
11>decoderD3.obj : error LNK2019: unresolved external symbol "public: void __thiscall decoder_check::run_CUDA(bool *,bool *,class FrameQueue *,class VideoDecoder *,unsigned int *,class CUmoduleManager *,bool *,int,class VideoSource *,bool *,struct CUfunc_st *,struct CUstream_st *,struct _CUcontextlock_st *,struct CUctx_st *)" (?run_CUDA@decoder_check@@QAEXPA_N0PAVFrameQueue@@PAVVideoDecoder@@PAIPAVCUmoduleManager@@0HPAVVideoSource@@0PAUCUfunc_st@@PAUCUstream_st@@PAU_CUcontextlock_st@@PAUCUctx_st@@@Z) referenced in function "public: void __thiscall CdecoderD3App::run_program_D0(char *)" (?run_program_D0@CdecoderD3App@@QAEXPAD@Z)
11>decoderD3.obj : error LNK2019: unresolved external symbol "public: __thiscall decoder_check::decoder_check(void)" (??0decoder_check@@QAE@XZ) referenced in function "public: void __thiscall CdecoderD3App::run_program_D0(char *)" (?run_program_D0@CdecoderD3App@@QAEXPAD@Z)
11>F:\projects\decoder_10-18 - Copy\decoderD3D9\Debug\testing_project.exe : fatal error LNK1120: 2 unresolved externals
11>

链接错误...任何人都可以帮助我,包含头文件,库也是如此。谢谢。

0 个答案:

没有答案