Sunday, 15 February 2015

c++ - Source code of CvCaptureFromFile(..) -



c++ - Source code of CvCaptureFromFile(..) -

i want utilize source code of cvcapturefromfile(..) function not want utilize opencv library functions in project. went within function pressing f10,f11 , copied things needed , converted them c code. till ok.

but when tried run getting linking error within function icvintffmpeg(void)

the errors follows:

error 1 error lnk2019: unresolved external symbol "__declspec(dllimport) void * __stdcall getprocaddress(struct hinstance__ *,char const *)" (__imp_?getprocaddress@@ygpaxpauhinstance__@@pbd@z) referenced in function "void __cdecl icvinitffmpeg(void)" (?icvinitffmpeg@@yaxxz) error 2 error lnk2019: unresolved external symbol "struct hinstance__ * __stdcall loadlibrary(char const *)" (?loadlibrary@@ygpauhinstance__@@pbd@z) referenced in function "void __cdecl icvinitffmpeg(void)" (?icvinitffmpeg@@yaxxz)

i copied in source code. thought going wrong? how solve error?

update: if wrap header file (where coping source code) within extern "c" this-

extern "c" { #include "defination.h" }

then first error gone, , error loadlibrary changes

error lnk2019: unresolved external symbol __imp__loadlibrary@4 referenced in function _icvinitffmpeg

opencv uses ffmpeg - big project. , ffmpeg uses other tools behind curtains. may want go using ffmpeg, take source code ffmpeg foolish - spend years fiddling code - really.

so, decide on video input library - opencv, ffmpeg, direct3d or whatever, , utilize it.

do not cling on thought 'you cannot utilize external libraries' because can't go without them. takes years develop such library - pretty sure not want go way.

c++ c opencv video-capture

No comments:

Post a Comment