Can't compile Hello World on MacOS 14.1 (23B74)
Apple clang version 15.0.0 (clang-1500.0.40.1) Target: x86_64-apple-darwin23.1.0 Mac OS 14.1 (23B74) Intel
Issue on this page: https://gstreamer.freedesktop.org/documentation/tutorials/basic/hello-world.html?gi-language=c
When compiling main.c via command
$
clang -c main.c -o main.o
pkg-config --cflags gstreamer-1.0``
I get this error
main.c:50:26: warning: incompatible function pointer types passing 'int (int, char **)' to parameter of type 'GstMainFunc' (aka 'int (*)(int, char **, void *)') [-Wincompatible-function-pointer-types] return gst_macos_main (tutorial_main, argc, argv, NULL); ^~~~~~~~~~~~~ /Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig/../../include/gstreamer-1.0/gst/gstmacos.h:32:64: note: passing argument to parameter 'main_func' here int gst_macos_main (GstMainFunc main_func, ^ 1 warning generated.
Switching this code
int tutorial_main (int argc, char *argv[])
to
int tutorial_main (int argc, char *argv, void dummy)
fixes the problem.