Skip to content

Commit 56b806d

Browse files
committed
fix up build errors with the regular makefile and non-cmake builds.
1 parent e93a0ef commit 56b806d

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

dlib/all/source.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "../dir_nav/dir_nav_kernel_1.cpp"
3636
#include "../dir_nav/dir_nav_kernel_2.cpp"
3737
#include "../dir_nav/dir_nav_extensions.cpp"
38+
#include "../fft/fft.cpp"
3839
#include "../linker/linker_kernel_1.cpp"
3940
#include "../logger/extra_logger_headers.cpp"
4041
#include "../logger/logger_kernel_1.cpp"
@@ -68,8 +69,9 @@
6869
#include "../image_saver/save_jpeg.cpp"
6970
#endif
7071

71-
#ifndef DLIB_NO_GUI_SUPPORT
7272
#include "../gui_widgets/fonts.cpp"
73+
74+
#ifndef DLIB_NO_GUI_SUPPORT
7375
#include "../gui_widgets/widgets.cpp"
7476
#include "../gui_widgets/drawable.cpp"
7577
#include "../gui_widgets/canvas_drawing.cpp"

dlib/image_loader/png_loader.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,10 @@ namespace dlib
4040
long nc() const;
4141

4242
template<class image_type>
43-
void get_image( image_type& img) const
43+
void get_image(image_type& img) const
4444
{
4545
#ifndef DLIB_PNG_SUPPORT
46-
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
47-
You are getting this error because you are trying to use the png_loader
48-
object but you haven't defined DLIB_PNG_SUPPORT. You must do so to use
49-
this object. You must also make sure you set your build environment
50-
to link against the libpng library.
51-
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
52-
COMPILE_TIME_ASSERT(sizeof(T) == 0);
46+
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.");
5347
#else
5448
using pixel_type = pixel_type_t<image_type>;
5549
auto t = make_image_view(img);

dlib/test/makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ TARGET = dtest
66

77
# these are the compile time flags passed to gcc
88
CXXFLAGS ?= -ggdb -Wall
9-
CPPFLAGS ?= -std=c++11 -DDEBUG -DDLIB_NO_GUI_SUPPORT -I../..
9+
CPPFLAGS ?= -std=c++14 -DDEBUG -DDLIB_NO_GUI_SUPPORT -I../..
1010

1111
# These are the link time flags passed to gcc
1212
LFLAGS = -lpthread -lnsl

0 commit comments

Comments
 (0)