I am using Windows 10. I am unable to configure Visual Studio 2017 to run basic Gstreamer tutorials. I am getting errors like 'cannot open gst/gst.h'. I am using gstreamer 1.0.
Please help.
I am using Windows 10. I am unable to configure Visual Studio 2017 to run basic Gstreamer tutorials. I am getting errors like 'cannot open gst/gst.h'. I am using gstreamer 1.0.
Please help.
Hello my friend.
First of you need to download the library from https://gstreamer.freedesktop.org/data/pkg/windows/
You need to download and install both installers for developers and non-developers.
For instance for 1.14 it is the now latest version,
You will install and setup both of them in the same directory like C:\gstreamer
. (I guess gstreamer automatically adds its /bin
to the Path environment. If not just ask it.)
After that you will open your Visual Studio. Create your C++ project. Create your main.cpp
file. Right click on your project and click properties.
We need to do 3 steps:
.lib
paths are. .libs
you want to use.After clicking properties:
C:\gstreamer\1.0\x86_64\lib\glib-2.0\include;C:\gstreamer\1.0\x86_64\include\gstreamer-1.0;C:\gstreamer\1.0\x86_64\include\glib-2.0\;C:\gstreamer\1.0\x86_64\include\glib-2.0\glib;%(AdditionalIncludeDirectories)
C:\gstreamer\1.0\x86_64\lib;%(AdditionalLibraryDirectories)
gobject-2.0.lib;glib-2.0.lib;gstreamer-1.0.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
gobject-2.0.lib;glib-2.0.lib;gstreamer-1.0.lib
are the ones we added, others are done by default.
That's all. You can just write in your main.cpp
file
#include <gst/gst.h>
and use your GStreamer Library
I think this will work for almost all libraries.
I'd prefer to comment on astarakastara's answer.. but don't have the reputation yet.
Note that you probably want to use the "MSVC" version of the install files: "gstreamer-1.0-devel-msvc-x86_64-1.16.1.msi" "gstreamer-1.0-msvc-x86_64-1.16.1.msi"
These are new since his/her answer, and include .pbd debugging files made for debugging in visual studio.
Also we need add dll path in the properties