Beginner issue, opencv prebuild dll (in 343) - LNK1107 error?

asked 2018-08-30 03:11:08 -0600

Laro88 gravatar image

updated 2018-08-30 05:52:33 -0600

I am trying to use opencv through the build\bin\opencv_ffmpeg_343.dll for a win32 application made in c++. Due to the project nature then I would like to reference the prebuild dll.

I keep getting a Linker error LNK1107 0x330, so compile is fine (headers are included)

1>C:\sharedlibs\opencv\build\bin\opencv_ffmpeg343.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x330

Win10 on 64 bit, VS2015

I suspected that it was due to our requirement to use multichar, however the failure is the same using unicode in a clean test project.

Any idea on what might be the cause - or does someone have a clean vs2015 project that uses the prebuild so I can compare to my broken setup?

Cheers Laro

edit retag flag offensive close merge delete

Comments

1

You cannot give a dll file as input for linker, give a .lib

LBerger gravatar imageLBerger ( 2018-08-30 03:17:52 -0600 )edit

opencv_ffmpeg343.dll has to be on your PATH. it will get linked dynamically at runtime via dlopen() etc.

you don't have to do anything about it in visualstudio.

berak gravatar imageberak ( 2018-08-30 04:18:43 -0600 )edit

but please clarify:

 through the rebuild opencv_ffmpeg_343.dll

what does that mean ? rebuild ? what did you do there ?

berak gravatar imageberak ( 2018-08-30 04:20:22 -0600 )edit
1

typo fixed. I basically try to use the .dll using the header files from the build\include

Laro88 gravatar imageLaro88 ( 2018-08-30 05:53:45 -0600 )edit

and again, you're not expected, to use that dll directly in any way in your project.

if you use VideoCapture(some_filename) it will try to load the dll, and resolve some functions inside on its own.

berak gravatar imageberak ( 2018-08-30 05:59:30 -0600 )edit