0

preface: While I am experienced with C# and am used to looking at C and C++ code for work, I have very little experience developing software outside of a game engine. This is probably a very basic question, but I don't know what to search to resolve it.

I'm working on a C++ program in Visual Studio 2019 on Windows 10. I would like to use 64-bit gstreamer in this program. I have followed the official installation instructions exactly (including adding the folder to PATH). However, I cannot build the examples.

At first, I was just getting errors about not being able to load several source files. I was able to fix this by manually adding several paths to Additional Include Directories:Image of additional include folders required to resolve issue

Now I am getting errors of the following type:

Unresolved external symbol __imp_gst_init referenced in function main

where gst_init is a real function called in the example. This appears to be something to do with trying to link to a dynamic library when you are actually linking to a static library (in this case since I am linked directly to the .h files, I presume I am linking to a static library). However, I don't understand where/how I indicate that these functions should be found in static libraries.

I have two questions:

  1. Why am I having to manually add these include folders? Do I have something set up weirdly?
  2. What am I doing wrong with the library linking?

Thanks!

Acorn
  • 24,970
  • 5
  • 40
  • 69

1 Answers1

0

Unresolved external symbol __imp_gst_init referenced in function main

This means you don't have GStreamer .dll's stub .lib linked to your application. As I know, GStreamer does not provide static libraries by default, and you have to use it as set of .dlls on Windows. So, to solve your issue you need link .lib files provided by GStreamer to your application. According to https://gstreamer.freedesktop.org/documentation/installing/on-windows.html?gi-language=c you can link it directly or use property pages to simplify this task.

RSATom
  • 817
  • 6
  • 16
  • Thank you, that did get me to the next stage, which was a message about a missing DLL (that hadn't been installed). This then brought me to what I think is the more basic step that I had missed, which is that I needed to install both the development AND runtime (hence all of these things being set wrong). – nintendoeats Oct 06 '19 at 13:40