GTK+ fatal compile errors basic-tutorial-5.c mac M1
Running on mac mini M1, Ventura 13.4.1(c); following GStreamer docs explicitly. FYI - For ease of work have locally renamed basic-tutorial-5.c to tut5.c.
Compile of basic-tutorial-5.c throws the following error (have not included warning which is generated as well). PLEASE ADIVSE best fix asap - thanks.
error: call to undeclared function 'gdk_quartz_window_get_nsview'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
window_handle = gdk_quartz_window_get_nsview (window);
^
tut5.c:42:19: note: did you mean 'gdk_quartz_window_get_type'?
/opt/homebrew/Cellar/gtk+3/3.24.38/include/gtk-3.0/gdk/quartz/gdkquartzwindow.h:46:11: note: 'gdk_quartz_window_get_type' declared here
GType gdk_quartz_window_get_type (void);
Note - changing call in above code to 'gdk_quartz_window_get_type'
does not fix.
**Prep steps & compile, per GStreamer tutorial docs: **
— set environment for pkg-config
Tell pkg-config where to find the .pc files
export PKG_CONFIG_PATH=/Library/Frameworks/GStreamer.framework/Versions/1.0/lib/pkgconfig
We will use the pkg-config provided by the GStreamer.framework
export PATH=/Library/Frameworks/GStreamer.framework/Versions/1.0/bin:$PATH
**— Compile and link **
gcc tut5.c -o tut5
pkg-config --cflags --libs gstreamer-video-1.0 gtk+-3.0 gstreamer-1.0``
Because no object file is generated, I can't run otool against it. However this is what is generate when I compile basic-tutorial-4 (tut4):
% otool -L tut4
tut4:
/opt/homebrew/opt/gstreamer/lib/libgstreamer-1.0.0.dylib (compatibility version 2205.0.0, current version 2205.0.0)
/opt/homebrew/opt/glib/lib/libgobject-2.0.0.dylib (compatibility version 7601.0.0, current version 7601.4.0)
/opt/homebrew/opt/glib/lib/libglib-2.0.0.dylib (compatibility version 7601.0.0, current version 7601.4.0)
/opt/homebrew/opt/gettext/lib/libintl.8.dylib (compatibility version 12.0.0, current version 12.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
%
Note: basic-tutorial-4.c generates errors during execution. Will post separate issue for that.