diff --git a/.github/workflows/code_checks.yml b/.github/workflows/code_checks.yml
index a7f8678be5..3538f280b1 100644
--- a/.github/workflows/code_checks.yml
+++ b/.github/workflows/code_checks.yml
@@ -54,6 +54,7 @@ jobs:
':!build/bakefiles/make_dist.mk' \
':!build/bakefiles/scintilla.bkl' \
':!docs/doxygen/doxygen-awesome-css/*' \
+ ':!samples/widgets/widgets.bkl' \
':!tests/test.bkl' \
':!**/*akefile*' \
':!**/*.pbxproj' \
diff --git a/samples/widgets/makefile.unx b/samples/widgets/makefile.unx
index 4c6351e153..fc826d79d0 100644
--- a/samples/widgets/makefile.unx
+++ b/samples/widgets/makefile.unx
@@ -220,5 +220,14 @@ widgets_widgets.o: ./widgets.cpp
.PHONY: all install uninstall clean
+widgets_native_wrapper.o: ./native_wrapper.mm ./native.cpp
+ $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(OBJCXXFLAGS) ./native_wrapper.mm
+
+ifeq ($(WX_PORT),osx_cocoa)
+WIDGETS_OBJECTS += widgets_native_wrapper.o
+
+widgets: widgets_native_wrapper.o
+endif
+
# Dependencies tracking:
-include ./*.d
diff --git a/samples/widgets/widgets.bkl b/samples/widgets/widgets.bkl
index 5c85f3aa40..25da900a70 100644
--- a/samples/widgets/widgets.bkl
+++ b/samples/widgets/widgets.bkl
@@ -13,13 +13,27 @@
-->
-
+
native_wrapper.mm
+
+widgets_native_wrapper.o: ./native_wrapper.mm ./native.cpp
+ $(CXX) -c -o $@ $(WIDGETS_CXXFLAGS) $(OBJCXXFLAGS) ./native_wrapper.mm
+
+ifeq ($(WX_PORT),osx_cocoa)
+WIDGETS_OBJECTS += widgets_native_wrapper.o
+
+widgets: widgets_native_wrapper.o
+endif
+
+
activityindicator.cpp