I’m attempting to build some video-reading code around libavformat. After getting the compiled DLLs and .lib files here, I go to build my code, and the linker can’t find any of the libavformat symbols even though I’ve linked in the provided .lib files.
Inspecting libavformat.lib with dumpbin -headers reveals that it exports the desired functions with an underscore prefix. For example, while I want to call avformat_open_input, the .lib file gives _avformat_open_input.
Why is this, and why can’t I link the precompiled dlls?
You need to do following all tasks to use
libavwithMSVC++. First goto ZeranoeSharedVersion, Copy all.dllfiles frombinfolder and paste them in the output directory whereexewill be generated.DeveloperVersion, Copy all.libfiles fromlibfolder and paste them with your main c++ file is located (e.g.Folder-1\Folder-2WhereFolder-1has the.slnfile so you have to put.libfiles inFolder-2)DeveloperVersion you downloaded in Step 2 copy all directories fromincludefolder and paste them in Folder-2 (See details about Folder-2 in step 2)C:\Program Files\Microsoft Visual Studio 10.0\VC\include\folder.You have to use this
externbecauselibavis aClibrary.