这个错误是我尝试使用此代码调用另一个类时遇到的错误。函数定义在头文件中,头文件包含在class 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>
链接错误...任何人都可以帮助我在这里包含头文件和库。谢谢你。