'How to compile the LIBVLC example code on windows using gcc

I want to build the libvlc example (https://wiki.videolan.org/LibVLC_Tutorial) so i downloaded the sources and also copied libvlc.dll and libvlccore.dll (from my vlc installation) into the current directory. Then i try to compile it by issuing

gcc example.c -o example -I./include -L./lib -L./ -llibvlc

but get the error

example.c:3:22: fatal error: vlc/vlc.h: No such file or directory
  #include <vlc/vlc.h>
                      ^

I hope this is enough information, i controlled all paths and files twice. Thank you in advance.



Solution 1:[1]

  1. you need vlc sdk, not just files from vlc source code ;
  2. you need dll files for your already compiled application, but for build you need .lib files - also part of sdk;
  3. for this you need to build them - for this step refer to https://medium.com/@tobias.strg/compiling-vlc-3-x-in-2020-a390c6a73c24;
  4. no doubt you can use some nigthly builds of vlc (check for zip files with "debug" suffix) https://artifacts.videolan.org/vlc-3.0/nightly-win64/20220420-0220;
  5. after you got sdk pack for your platform you can compile - pointing to headers files from sdk, and linking with libs from sdk;

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 AlexBee