0

I think this is a basic question, however I can not find any adequate posts about this topic or maybe I just don´t know how to find the right wording when searching.

I have two projects in two different solutions. Project A is an application (.exe) using third party libs like ffmpeg (native C) and Project B is a DLL, which wants to use code of Project A (Purpose: A C# project is suppose to use funktionality of Project A via Project B). From my point of view I just have to add include path to Project A in order to include source files of it and set the linker input to the Project B .obj. However, when compiling Project B MSVS can not find the header file "libavutil/opt.h" of a ffmpeg Header:

#pragma once
extern "C"
{
#include <libavutil/opt.h>
#include <libavcodec/avcodec.h>
#include <libavutil/channel_layout.h>
#include <libavutil/common.h>
#include <libavutil/imgutils.h>
#include <libavutil/mathematics.h>
#include <libavutil/samplefmt.h>
}

fatal error C1083: Cannot open include file: 'libavutil/opt.h': No such file or directory.

Do I really have to set include paths to those ffmpeg libs? If doing so I get many LNK2001, 2005 and 2019 errors. Any Ideas?

Richard
  • 27
  • 6
  • ***I set the additional include path in the wrapper project to the path of the ffmpeg folder, I get several LNK2019 errors like this*** Did you add the Additional Link Dependencies? – drescherjm May 11 '16 at 21:24
  • What I don´t understand is: why do I have to add the additional include folder of ffmpeg also in the wrapper project, since the entire inclusion of the ffmpeg source files happens only in the productive project. Is it because the productive project is not a static lib but an executable exe? I added the additional lib to the linker, but the LNK2019 error remained, however this morning - after starting VS again - it builds now... – Richard May 12 '16 at 07:47

0 Answers0