From 56b806d1d389ea016c845a4da546ab082c4ff7a0 Mon Sep 17 00:00:00 2001
From: Davis King <davis@dlib.net>
Date: Sat, 9 Aug 2025 12:21:07 -0400
Subject: [PATCH] fix up build errors with the regular makefile and non-cmake
 builds.

---
 dlib/all/source.cpp            |  4 +++-
 dlib/image_loader/png_loader.h | 10 ++--------
 dlib/test/makefile             |  2 +-
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/dlib/all/source.cpp b/dlib/all/source.cpp
index 04756d19cd..a187370bd5 100644
--- a/dlib/all/source.cpp
+++ b/dlib/all/source.cpp
@@ -35,6 +35,7 @@
 #include "../dir_nav/dir_nav_kernel_1.cpp"
 #include "../dir_nav/dir_nav_kernel_2.cpp"
 #include "../dir_nav/dir_nav_extensions.cpp"
+#include "../fft/fft.cpp"
 #include "../linker/linker_kernel_1.cpp"
 #include "../logger/extra_logger_headers.cpp"
 #include "../logger/logger_kernel_1.cpp"
@@ -68,8 +69,9 @@
 #include "../image_saver/save_jpeg.cpp"
 #endif
 
-#ifndef DLIB_NO_GUI_SUPPORT
 #include "../gui_widgets/fonts.cpp"
+
+#ifndef DLIB_NO_GUI_SUPPORT
 #include "../gui_widgets/widgets.cpp"
 #include "../gui_widgets/drawable.cpp"
 #include "../gui_widgets/canvas_drawing.cpp"
diff --git a/dlib/image_loader/png_loader.h b/dlib/image_loader/png_loader.h
index 421a29cbe4..9318c3410f 100644
--- a/dlib/image_loader/png_loader.h
+++ b/dlib/image_loader/png_loader.h
@@ -40,16 +40,10 @@ namespace dlib
         long nc()                   const;
 
         template<class image_type>
-        void get_image( image_type& img) const 
+        void get_image(image_type& img) const 
         {
 #ifndef DLIB_PNG_SUPPORT
-            /* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-                You are getting this error because you are trying to use the png_loader
-                object but you haven't defined DLIB_PNG_SUPPORT.  You must do so to use
-                this object.   You must also make sure you set your build environment
-                to link against the libpng library.
-            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
-            COMPILE_TIME_ASSERT(sizeof(T) == 0);
+            static_assert(sizeof(image_type) == 0, "You are getting this error because you are trying to use the png_loader object but you haven't defined DLIB_PNG_SUPPORT.  You must do so to use this object.   You must also make sure you set your build environment to link against the libpng library.");
 #else
             using pixel_type = pixel_type_t<image_type>;
             auto t = make_image_view(img);
diff --git a/dlib/test/makefile b/dlib/test/makefile
index d4d4787059..3ed1b9b469 100644
--- a/dlib/test/makefile
+++ b/dlib/test/makefile
@@ -6,7 +6,7 @@ TARGET = dtest
 
 # these are the compile time flags passed to gcc
 CXXFLAGS ?= -ggdb -Wall
-CPPFLAGS ?= -std=c++11 -DDEBUG -DDLIB_NO_GUI_SUPPORT -I../..
+CPPFLAGS ?= -std=c++14 -DDEBUG -DDLIB_NO_GUI_SUPPORT -I../..
 
 # These are the link time flags passed to gcc
 LFLAGS = -lpthread   -lnsl 
