Trying to create a New a Api in OpenCv in Windows?

asked 2017-12-14 05:45:30 -0600

Chandra Sekar gravatar image

updated 2017-12-14 07:14:50 -0600

opencv_Videoio. Trying to Add a New Api in videocapture class.. Ending up in the linking error?

Added: 1. Added a api declaration in the videoio.hpp 2. Definition for that api in the cap_dshow.cpp and declaration for that in the cap_dshow.hpp

Can Anyone please answer this one ? Thanks In ADVANCE..

Error 3 error LNK2001: unresolved external symbol "public: virtual void __thiscall cv::VideoCapture::CheckDevices(int)" (?CheckDevices@VideoCapture@cv@@UAEXH@Z) F:\OpenCv Projects\opencv_3.3.1\build\modules\videoio\cap.obj opencv_videoio Error 4 error LNK2001: unresolved external symbol "public: virtual void __thiscall cv::VideoCapture::CheckDevices(int)" (?CheckDevices@VideoCapture@cv@@UAEXH@Z) F:\OpenCv Projects\opencv_3.3.1\build\modules\videoio\opencv_videoio_pch.obj opencv_videoio Error 5 error LNK1120: 1 unresolved externals F:\OpenCv Projects\opencv_3.3.1\build\bin\Release\opencv_videoio331.dll opencv_videoio

edit retag flag offensive close merge delete

Comments

did you rebuild the opencv libs after your changes ?

did you clean the build folder, before doing so ? the precompiled header file does not seem to be updated

if you build the INSTALL projects, your libs & dlls will end up in build\install, so are you sure , you got the right lib/dll ?

berak gravatar imageberak ( 2017-12-14 09:23:07 -0600 )edit

Yeah, I Rebuilded after my changes. Except the opencv_videoio331.dll , every other dlls were ended up in the debug/release folder.

Actually, in videocapture class, there is an API called open, which opens the camera for the application. Following that, i replicated same as that using my declaration as, "cv_Wrap virtual CheckDevices(int)". My doubt is , Is there any problem with the virtual keyword?? If not i dont know exactly...

Chandra Sekar gravatar imageChandra Sekar ( 2017-12-14 23:42:59 -0600 )edit

please add the exact declaration and definition of your function to your question

berak gravatar imageberak ( 2017-12-15 03:28:13 -0600 )edit