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?