Commit da6e4807 authored by Davis King's avatar Davis King

Added some preprocessor stuff to check if the user is #including

dlib/all/source.cpp into their own .cpp files.  If so they will get a useful
error message.
parent 12d9d257
// Copyright (C) 2003 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifdef DLIB_ALL_SOURCE_END
#include "dlib_basic_cpp_build_tutorial.txt"
#endif
#ifndef DLIB_ALGs_
#define DLIB_ALGs_
......
......@@ -3,6 +3,10 @@
#ifndef DLIB_ALL_SOURCe_
#define DLIB_ALL_SOURCe_
#if defined(DLIB_ALGs_) || defined(DLIB_PLATFORm_)
#include "../dlib_basic_cpp_build_tutorial.txt"
#endif
// ISO C++ code
#include "../base64/base64_kernel_1.cpp"
#include "../bigint/bigint_kernel_1.cpp"
......@@ -73,5 +77,8 @@
#endif // DLIB_ISO_CPP_ONLY
#define DLIB_ALL_SOURCE_END
#endif // DLIB_ALL_SOURCe_
// Copyright (C) 2011 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifdef DLIB_ALL_SOURCE_END
#include "dlib_basic_cpp_build_tutorial.txt"
#endif
#ifndef DLIB_BRIdGE_
#define DLIB_BRIdGE_
......
#error "Don't write #include <dlib/all/source.cpp> in your code."
/*
In C++, it is generally an error to #include .cpp files. This is because it
can lead to what are called multiply defined symbol errors. Therefore, you
should compile dlib/all/source.cpp into your application just like you would
compile any other .cpp file.
If you are using Visual Studio you add .cpp files to your application using
the solution explorer window. Specifically, right click on Source Files,
then select Add -> Existing Item and select the .cpp files you want to add.
For general information on compiling dlib see http://dlib.net/compile.html
*/
// Copyright (C) 2005 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifdef DLIB_ALL_SOURCE_END
#include "dlib_basic_cpp_build_tutorial.txt"
#endif
#ifndef DLIB_GUI_WIDGETs_
#define DLIB_GUI_WIDGETs_
......
// Copyright (C) 2006 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifdef DLIB_ALL_SOURCE_END
#include "dlib_basic_cpp_build_tutorial.txt"
#endif
#ifndef DLIB_IMAGe_IO_
#define DLIB_IMAGe_IO_
......
// Copyright (C) 2011 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifdef DLIB_ALL_SOURCE_END
#include "dlib_basic_cpp_build_tutorial.txt"
#endif
#ifndef DLIB_IMAGE_PROCESSInG_H_h_
#define DLIB_IMAGE_PROCESSInG_H_h_
......
// Copyright (C) 2006 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifdef DLIB_ALL_SOURCE_END
#include "dlib_basic_cpp_build_tutorial.txt"
#endif
#ifndef DLIB_IMAGE_TRANSFORMs_
#define DLIB_IMAGE_TRANSFORMs_
......
// Copyright (C) 2009 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifdef DLIB_ALL_SOURCE_END
#include "dlib_basic_cpp_build_tutorial.txt"
#endif
#ifndef DLIB_OPEnCV_HEADER
#define DLIB_OPEnCV_HEADER
......
// Copyright (C) 2006 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifdef DLIB_ALL_SOURCE_END
#include "dlib_basic_cpp_build_tutorial.txt"
#endif
#ifndef DLIB_PLATFORm_
#define DLIB_PLATFORm_
......
// Copyright (C) 2007 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifdef DLIB_ALL_SOURCE_END
#include "dlib_basic_cpp_build_tutorial.txt"
#endif
#ifndef DLIB_SVm_HEADER
#define DLIB_SVm_HEADER
......
// Copyright (C) 2008 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifdef DLIB_ALL_SOURCE_END
#include "dlib_basic_cpp_build_tutorial.txt"
#endif
#ifndef DLIB_SVm_THREADED_HEADER
#define DLIB_SVm_THREADED_HEADER
......
// Copyright (C) 2003 Davis E. King (davis@dlib.net)
// License: Boost Software License See LICENSE.txt for the full license.
#ifdef DLIB_ALL_SOURCE_END
#include "dlib_basic_cpp_build_tutorial.txt"
#endif
#ifndef DLIB_THREADs_
#define DLIB_THREADs_
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment