diff --git a/UnitTest/UnitTest.vcxproj b/UnitTest/UnitTest.vcxproj
index a0585026c..1a9ac64c7 100644
--- a/UnitTest/UnitTest.vcxproj
+++ b/UnitTest/UnitTest.vcxproj
@@ -58,7 +58,7 @@
Level4
true
$(VCInstallDir)UnitTest\include;$(ProjectDir);$(SolutionDir)modules\c++;$(SolutionDir)modules\c++\avx\include;$(SolutionDir)modules\c++\cli\include;$(SolutionDir)modules\c++\config\include;$(SolutionDir)modules\c++\coda_oss\include;$(SolutionDir)modules\c++\gsl\include;$(SolutionDir)modules\c++\hdf5.lite\include;$(SolutionDir)modules\c++\io\include;$(SolutionDir)modules\c++\std\include;$(SolutionDir)modules\c++\str\include;$(SolutionDir)modules\c++\sys\include;$(SolutionDir)modules\c++\except\include;$(SolutionDir)modules\c++\logging\include;$(SolutionDir)modules\c++\math\include;$(SolutionDir)modules\c++\math.linear\include;$(SolutionDir)modules\c++\math.poly\include;$(SolutionDir)modules\c++\mem\include;$(SolutionDir)modules\c++\mt\include;$(SolutionDir)modules\c++\polygon\include;$(SolutionDir)modules\c++\re\include;$(SolutionDir)modules\c++\types\include;$(SolutionDir)modules\c++\units\include;$(SolutionDir)modules\c++\xml.lite\include;$(SolutionDir)modules\c++\zip\include;$(SolutionDir)modules\drivers;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include;%(AdditionalIncludeDirectories)
- _DEBUG;%(PreprocessorDefinitions);MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1
+ _DEBUG;%(PreprocessorDefinitions);MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1;CODA_OSS_LIBRARY_SHARED=1
true
pch.h
true
@@ -88,7 +88,7 @@
true
true
$(VCInstallDir)UnitTest\include;$(ProjectDir);$(SolutionDir)modules\c++;$(SolutionDir)modules\c++\avx\include;$(SolutionDir)modules\c++\cli\include;$(SolutionDir)modules\c++\config\include;$(SolutionDir)modules\c++\coda_oss\include;$(SolutionDir)modules\c++\gsl\include;$(SolutionDir)modules\c++\hdf5.lite\include;$(SolutionDir)modules\c++\io\include;$(SolutionDir)modules\c++\std\include;$(SolutionDir)modules\c++\str\include;$(SolutionDir)modules\c++\sys\include;$(SolutionDir)modules\c++\except\include;$(SolutionDir)modules\c++\logging\include;$(SolutionDir)modules\c++\math\include;$(SolutionDir)modules\c++\math.linear\include;$(SolutionDir)modules\c++\math.poly\include;$(SolutionDir)modules\c++\mem\include;$(SolutionDir)modules\c++\mt\include;$(SolutionDir)modules\c++\polygon\include;$(SolutionDir)modules\c++\re\include;$(SolutionDir)modules\c++\types\include;$(SolutionDir)modules\c++\units\include;$(SolutionDir)modules\c++\xml.lite\include;$(SolutionDir)modules\c++\zip\include;$(SolutionDir)modules\drivers;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include;%(AdditionalIncludeDirectories)
- NDEBUG;%(PreprocessorDefinitions);MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1
+ NDEBUG;%(PreprocessorDefinitions);MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1;CODA_OSS_LIBRARY_SHARED=1
true
pch.h
true
diff --git a/cmake/CodaBuild.cmake b/cmake/CodaBuild.cmake
index ca1c3961b..c4c859da6 100644
--- a/cmake/CodaBuild.cmake
+++ b/cmake/CodaBuild.cmake
@@ -128,8 +128,12 @@ macro(coda_initialize_build)
option(BUILD_SHARED_LIBS "Build shared libraries instead of static." OFF)
if(BUILD_SHARED_LIBS)
set(CODA_LIBRARY_TYPE "shared")
+ add_definitions(-DCODA_OSS_LIBRARY_SHARED=1)
+ add_definitions(-UCODA_OSS_LIBRARY_STATIC)
else()
set(CODA_LIBRARY_TYPE "static")
+ add_definitions(-DCODA_OSS_LIBRARY_STATIC=1)
+ add_definitions(-UCODA_OSS_LIBRARY_SHARED)
endif()
option(CODA_BUILD_TESTS "build tests" ON)
diff --git a/modules/c++/coda-oss.vcxproj b/modules/c++/coda-oss.vcxproj
index 1199fd0d6..585e65455 100644
--- a/modules/c++/coda-oss.vcxproj
+++ b/modules/c++/coda-oss.vcxproj
@@ -568,7 +568,7 @@
Level4
true
- _DEBUG;_LIB;%(PreprocessorDefinitions);CODA_OSS_EXPORTS;CODA_OSS_DLL;MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1
+ _DEBUG;%(PreprocessorDefinitions);MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1;CODA_OSS_EXPORTS;CODA_OSS_LIBRARY_SHARED=1
pch.h
cli\include;coda_oss\include;config\include;dbi\include;except\include;gsl\include;hdf5.lite\include;io\include;logging\include;math\include;math.linear\include;math.poly\include;mem\include;mt\include;net\include;net.ssl\include;plugin\include;polygon\include;re\include;sio.lite\include;std\include;str\include;sys\include;tiff\include;types\include;unique\include;units\include;xml.lite\include;zip\include;$(ProjectDir)include;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include;$(SolutionDir)externals\$(ProjectName)\out\install\$(Platform)-$(Configuration)\include
Use
@@ -601,7 +601,7 @@
true
true
true
- NDEBUG;_LIB;%(PreprocessorDefinitions);CODA_OSS_EXPORTS;CODA_OSS_DLL;MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1
+ NDEBUG;%(PreprocessorDefinitions);MT_DEFAULT_PINNING=0;RE_ENABLE_STD_REGEX=1;CODA_OSS_EXPORTS;CODA_OSS_LIBRARY_SHARED=1
pch.h
cli\include;coda_oss\include;config\include;dbi\include;except\include;gsl\include;hdf5.lite\include;io\include;logging\include;math\include;math.linear\include;math.poly\include;mem\include;mt\include;net\include;net.ssl\include;plugin\include;polygon\include;re\include;sio.lite\include;std\include;str\include;sys\include;tiff\include;types\include;unique\include;units\include;xml.lite\include;zip\include;$(ProjectDir)include;$(SolutionDir)out\install\$(Platform)-$(Configuration)\include;$(SolutionDir)externals\$(ProjectName)\out\install\$(Platform)-$(Configuration)\include
Use
@@ -617,6 +617,7 @@
stdc11
true
Level3
+ Speed
diff --git a/modules/c++/config/include/config/Exports.h b/modules/c++/config/include/config/Exports.h
index 6b77d9fd7..71949e7c7 100644
--- a/modules/c++/config/include/config/Exports.h
+++ b/modules/c++/config/include/config/Exports.h
@@ -1,22 +1,30 @@
-#ifndef CODA_OSS_config_Exports_h_INCLUDED_
-#define CODA_OSS_config_Exports_h_INCLUDED_
#pragma once
#include "config/compiler_extensions.h"
-// Need to specify how this code will be consumed, either CODA_OSS_LIB (static library)
-// or CODA_OSS_DLL (aka "shared" library). For DLLs, it needs to be set for BOTH
+// Need to specify how this code will be consumed, either CODA_OSS_LIB_ (static library)
+// or CODA_OSS_DLL_ (aka "shared" library). For DLLs, it needs to be set for BOTH
// "exporting" (building this code) and "importing" (consuming).
//
// Use Windows naming conventions (DLL, LIB) because this really only matters for _MSC_VER, see below.
-#if !defined(CODA_OSS_LIB) && !defined(CODA_OSS_DLL)
- #define CODA_OSS_LIB 1
- //#define CODA_OSS_DLL 1
+#if !defined(CODA_OSS_LIB_) && !defined(CODA_OSS_DLL_)
+ #if CODA_OSS_LIBRARY_SHARED
+ #if CODA_OSS_LIBRARY_STATIC
+ #error "CODA_OSS_LIBRARY_SHARED already #define'd'"
+ #endif
+ #define CODA_OSS_DLL_ 1 // Symbols must be exported and imported (see below).
+ #else
+ // CODA_OSS_LIBRARY_STATIC doesn't have to be defined
+ #define CODA_OSS_LIB_ 1 // Static library, all symbols visible.
+ #endif
#endif
-#if defined(CODA_OSS_LIB) && defined(CODA_OSS_DLL)
- #error "Both CODA_OSS_LIB and CODA_OSS_DLL are #define'd'"
+#if !defined(CODA_OSS_LIB_) && !defined(CODA_OSS_DLL_)
+ #error "One of CODA_OSS_LIB_ pr CODA_OSS_DLL_ must be #define'd'"
#endif
-#if defined(CODA_OSS_EXPORTS) && defined(CODA_OSS_LIB)
+#if defined(CODA_OSS_LIB_) && defined(CODA_OSS_DLL_)
+ #error "Both CODA_OSS_LIB_ and CODA_OSS_DLL_ are #define'd'"
+#endif
+#if defined(CODA_OSS_EXPORTS) && defined(CODA_OSS_LIB_)
#error "Can't export from a LIB'"
#endif
@@ -35,10 +43,10 @@
// We need to know whether we're consuming (importing) a DLL or static LIB
// The default is a static LIB as that's what existing code/builds expect.
- #ifdef CODA_OSS_DLL
+ #ifdef CODA_OSS_DLL_
// Actually, it seems that the linker is able to figure this out from the .LIB, so
// there doesn't seem to be a need for __declspec(dllimport). Clients don't
- // need to #define CODA_OSS_DLL ... ? Well, almost ... it looks
+ // need to #define CODA_OSS_DLL_ ... ? Well, almost ... it looks
// like __declspec(dllimport) is needed to get virtual "inline"s (e.g.,
// destructors) correct.
#define CODA_OSS_API CODA_OSS_library_import
@@ -50,5 +58,3 @@
#if defined(_MSC_VER)
#pragma warning(disable: 4251) // '...' : class '...' needs to have dll-interface to be used by clients of struct '...'
#endif
-
-#endif // CODA_OSS_config_Exports_h_INCLUDED_
diff --git a/modules/c++/io/include/io/Serializable.h b/modules/c++/io/include/io/Serializable.h
index e6d2363ae..4db6eeab7 100644
--- a/modules/c++/io/include/io/Serializable.h
+++ b/modules/c++/io/include/io/Serializable.h
@@ -19,10 +19,12 @@
* see .
*
*/
-
+#pragma once
#ifndef __IO_SERIALIZABLE_H__
#define __IO_SERIALIZABLE_H__
+#include "config/Exports.h"
+
#include "io/InputStream.h"
#include "io/OutputStream.h"
@@ -46,7 +48,7 @@ namespace io
* This object has a known derived type SOAPMessage, which is concretely
* defined to handle SOAP objects
*/
-struct Serializable
+struct CODA_OSS_API Serializable
{
Serializable() = default;
virtual ~Serializable() noexcept(false) {}
diff --git a/modules/c++/logging/include/logging/Setup.h b/modules/c++/logging/include/logging/Setup.h
index ed6334d6e..763767a49 100644
--- a/modules/c++/logging/include/logging/Setup.h
+++ b/modules/c++/logging/include/logging/Setup.h
@@ -20,6 +20,7 @@
*
*/
+#pragma once
#ifndef CODA_OSS_logging_Setup_h_INCLUDED_
#define CODA_OSS_logging_Setup_h_INCLUDED_
@@ -29,6 +30,7 @@
#include "mem/SharedPtr.h"
#include "logging/Logger.h"
#include "sys/filesystem.h"
+#include "config/Exports.h"
namespace logging
{
@@ -48,7 +50,7 @@ using path = coda_oss::filesystem::path; // still used in SWIG bindings
* \param logCount - number of rotating logs to keep (default: 0 no rotation)
* \param logBytes - number of bytes per rotating log (default: 0 no rotation)
*/
-std::unique_ptr setupLogger(
+CODA_OSS_API std::unique_ptr setupLogger(
const path& program,
const std::string& logLevel = "warning",
const path& logFile = "console",
diff --git a/modules/c++/pch.h b/modules/c++/pch.h
index 7952e6efa..5cda65986 100644
--- a/modules/c++/pch.h
+++ b/modules/c++/pch.h
@@ -5,8 +5,13 @@
// Do not add files here that you will be updating frequently as this negates the performance advantage.
#pragma once
-#ifndef CODA_OSS_pch_h_INCLUDED_
-#define CODA_OSS_pch_h_INCLUDED_
+
+// We're building in Visual Studio ... used to control where we get a little bit
+// of config info
+#define CODA_OSS_PCH 1
+#ifndef CODA_OSS_LIBRARY_SHARED
+#define CODA_OSS_LIBRARY_SHARED 1
+#endif
#include "coda_oss/CPlusPlus.h"
#include "config/disable_compiler_warnings.h"
@@ -114,4 +119,3 @@ CODA_OSS_disable_warning_pop
#include "hdf5/lite/H5_.h"
#pragma comment(lib, "hdf5-c++.lib")
-#endif //CODA_OSS_pch_h_INCLUDED_
diff --git a/modules/c++/plugin/include/plugin/ErrorHandler.h b/modules/c++/plugin/include/plugin/ErrorHandler.h
index be7ca3c8a..234e6c5a1 100644
--- a/modules/c++/plugin/include/plugin/ErrorHandler.h
+++ b/modules/c++/plugin/include/plugin/ErrorHandler.h
@@ -19,7 +19,7 @@
* see .
*
*/
-
+#pragma once
#ifndef __PLUGIN_ERROR_HANDLER_H__
#define __PLUGIN_ERROR_HANDLER_H__
@@ -27,9 +27,11 @@
#include
#include
+#include "config/Exports.h"
+
namespace plugin
{
-class ErrorHandler
+class CODA_OSS_API ErrorHandler
{
public:
ErrorHandler() {}
@@ -47,7 +49,7 @@ class ErrorHandler
virtual void onPluginError(except::Context& c) = 0;
};
-class DefaultErrorHandler : public ErrorHandler
+class CODA_OSS_API DefaultErrorHandler final : public ErrorHandler
{
public:
DefaultErrorHandler(logging::LoggerPtr logger = logging::LoggerPtr());
diff --git a/modules/c++/sio.lite/include/sio/lite/FileHeader.h b/modules/c++/sio.lite/include/sio/lite/FileHeader.h
index a5633e509..1a76c1676 100644
--- a/modules/c++/sio.lite/include/sio/lite/FileHeader.h
+++ b/modules/c++/sio.lite/include/sio/lite/FileHeader.h
@@ -19,6 +19,7 @@
* see .
*
*/
+#pragma once
#ifndef __SIO_LITE_FILE_HEADER_H__
#define __SIO_LITE_FILE_HEADER_H__
@@ -28,6 +29,7 @@
#include
#include
#include
+#include "config/Exports.h"
#include "sio/lite/UserDataDictionary.h"
#include "sio/lite/InvalidHeaderException.h"
#include "sio/lite/UnsupportedDataTypeException.h"
@@ -37,7 +39,7 @@ namespace sio
namespace lite
{
-class FileHeader
+class CODA_OSS_API FileHeader
{
public:
/** Unsigned byte data */
diff --git a/modules/c++/sio.lite/include/sio/lite/FileReader.h b/modules/c++/sio.lite/include/sio/lite/FileReader.h
index b94fbc1ae..885b3b68b 100644
--- a/modules/c++/sio.lite/include/sio/lite/FileReader.h
+++ b/modules/c++/sio.lite/include/sio/lite/FileReader.h
@@ -19,10 +19,6 @@
* see .
*
*/
-#ifndef CODA_OSS_sio_lite_FileReader_h_INCLUDED_
-#define CODA_OSS_sio_lite_FileReader_h_INCLUDED_
#pragma once
-
#include "sio/lite/SioFileReader.h"
-#endif // CODA_OSS_sio_lite_FileReader_h_INCLUDED_
diff --git a/modules/c++/sio.lite/include/sio/lite/SioFileReader.h b/modules/c++/sio.lite/include/sio/lite/SioFileReader.h
index 446476dfc..54fe31c32 100644
--- a/modules/c++/sio.lite/include/sio/lite/SioFileReader.h
+++ b/modules/c++/sio.lite/include/sio/lite/SioFileReader.h
@@ -19,12 +19,14 @@
* see .
*
*/
+#pragma once
#ifndef __SIO_LITE_FILE_READER_H__
#define __SIO_LITE_FILE_READER_H__
#include
#include
#include
+#include "config/Exports.h"
#include "sio/lite/InvalidHeaderException.h"
#include "sio/lite/StreamReader.h"
@@ -80,12 +82,9 @@ namespace lite
\endcode
*/
-class FileReader : public StreamReader, public io::Seekable
+class CODA_OSS_API FileReader : public StreamReader, public io::Seekable
{
-
-
public:
-
/** Constructor */
FileReader() : StreamReader() {}
diff --git a/modules/c++/sio.lite/include/sio/lite/StreamReader.h b/modules/c++/sio.lite/include/sio/lite/StreamReader.h
index 982b8900f..efa9897ff 100644
--- a/modules/c++/sio.lite/include/sio/lite/StreamReader.h
+++ b/modules/c++/sio.lite/include/sio/lite/StreamReader.h
@@ -19,10 +19,12 @@
* see .
*
*/
+#pragma once
#ifndef __SIO_LITE_STREAM_READER_H__
#define __SIO_LITE_STREAM_READER_H__
#include
+#include "config/Exports.h"
#include "sio/lite/FileHeader.h"
namespace sio
@@ -87,7 +89,7 @@ namespace lite
\endcode
*
*/
-class StreamReader : public io::InputStream
+class CODA_OSS_API StreamReader : public io::InputStream
{
public:
/** Constructor */
diff --git a/modules/c++/sys/include/sys/DLL.h b/modules/c++/sys/include/sys/DLL.h
index 28fbb6be5..c384a461b 100644
--- a/modules/c++/sys/include/sys/DLL.h
+++ b/modules/c++/sys/include/sys/DLL.h
@@ -20,7 +20,7 @@
*
*/
-
+#pragma once
#ifndef __SYS_DLL_H__
#define __SYS_DLL_H__
@@ -52,6 +52,7 @@ typedef void* DLL_FUNCTION_PTR;
#include "except/Exception.h"
#include "sys/Err.h"
+#include "config/Exports.h"
namespace sys
@@ -124,7 +125,7 @@ struct DLLException : public except::Exception
*/
-struct DLL
+struct CODA_OSS_API DLL
{
/*!
* Construct a library object, but dont populate or load it
diff --git a/modules/c++/sys/include/sys/FileFinder.h b/modules/c++/sys/include/sys/FileFinder.h
index 0485de3c8..e60ec8553 100644
--- a/modules/c++/sys/include/sys/FileFinder.h
+++ b/modules/c++/sys/include/sys/FileFinder.h
@@ -20,6 +20,7 @@
*
*/
+#pragma once
#ifndef __SYS_FILE_FINDER_H__
#define __SYS_FILE_FINDER_H__
@@ -37,7 +38,7 @@ namespace sys
/**
* Predicate interface for all entries
*/
-struct FilePredicate
+struct CODA_OSS_API FilePredicate
{
using argument_type = std::string;
using result_type = bool;
@@ -58,7 +59,7 @@ struct ExistsPredicate : FilePredicate
/**
* Predicate that matches files only (no directories)
*/
-struct FileOnlyPredicate: public FilePredicate
+struct CODA_OSS_API FileOnlyPredicate : public FilePredicate
{
virtual ~FileOnlyPredicate() = default;
virtual bool operator()(const std::string& entry) const override;
@@ -147,7 +148,7 @@ struct LogicalPredicate : public FilePredicate
* The FileFinder class allows you to search for
* files/directories in a clean way.
*/
-struct FileFinder final
+struct CODA_OSS_API FileFinder final
{
FileFinder() = default;
~FileFinder() = default;
@@ -167,7 +168,7 @@ struct FileFinder final
// until either the file is found or we stop at a ".git" directory.
//
// This (obviously) might take a while, so consider whether the result should be cached.
-coda_oss::filesystem::path findFirstFile(const coda_oss::filesystem::path& startingDirectory, const coda_oss::filesystem::path& filename);
+CODA_OSS_API coda_oss::filesystem::path findFirstFile(const coda_oss::filesystem::path& startingDirectory, const coda_oss::filesystem::path& filename);
coda_oss::filesystem::path findFirstDirectory(const coda_oss::filesystem::path& startingDirectory, const coda_oss::filesystem::path& dir);
// This is here most to avoid creating a new module for a few utility routines
@@ -175,11 +176,11 @@ namespace test // i.e., sys::test
{
// Try to find the specified "root" directory starting at the given path.
// Used by unittest to find sample files.
- coda_oss::filesystem::path findRootDirectory(const coda_oss::filesystem::path& p, const std::string& rootName,
+ CODA_OSS_API coda_oss::filesystem::path findRootDirectory(const coda_oss::filesystem::path& p, const std::string& rootName,
std::function isRoot);
- coda_oss::filesystem::path findCMakeBuildRoot(const coda_oss::filesystem::path& p);
- bool isCMakeBuild(const coda_oss::filesystem::path& p);
+ CODA_OSS_API coda_oss::filesystem::path findCMakeBuildRoot(const coda_oss::filesystem::path& p);
+ bool CODA_OSS_API isCMakeBuild(const coda_oss::filesystem::path& p);
coda_oss::filesystem::path findCMakeInstallRoot(const coda_oss::filesystem::path& p);
bool isCMakeInstall(const coda_oss::filesystem::path& p);
diff --git a/modules/c++/sys/include/sys/sys_filesystem.h b/modules/c++/sys/include/sys/sys_filesystem.h
index 59df476a5..3cbab0837 100644
--- a/modules/c++/sys/include/sys/sys_filesystem.h
+++ b/modules/c++/sys/include/sys/sys_filesystem.h
@@ -79,6 +79,7 @@ struct CODA_OSS_API path final // N.B. this is an INCOMPLETE and NON-STANDARD im
{
*this = source;
}
+ ~path() = default;
path& operator=(const path&) = default;
path& operator=(path&&) = default;
diff --git a/modules/c++/tiff/include/tiff/FileReader.h b/modules/c++/tiff/include/tiff/FileReader.h
index 88edb7c41..b80d50833 100644
--- a/modules/c++/tiff/include/tiff/FileReader.h
+++ b/modules/c++/tiff/include/tiff/FileReader.h
@@ -20,9 +20,9 @@
*
*/
+#pragma once
#ifndef CODA_OSS_tiff_FileReader_h_INCLUDED_
#define CODA_OSS_tiff_FileReader_h_INCLUDED_
-#pragma once
#include "tiff/TiffFileReader.h"
diff --git a/modules/c++/tiff/include/tiff/FileWriter.h b/modules/c++/tiff/include/tiff/FileWriter.h
index d77af0d6f..e86b03453 100644
--- a/modules/c++/tiff/include/tiff/FileWriter.h
+++ b/modules/c++/tiff/include/tiff/FileWriter.h
@@ -20,9 +20,9 @@
*
*/
+#pragma once
#ifndef CODA_OSS_tiff_FileWriter_h_INCLUDED_
#define CODA_OSS_tiff_FileWriter_h_INCLUDED_
-#pragma once
#include "tiff/TiffFileWriter.h"
diff --git a/modules/c++/tiff/include/tiff/Header.h b/modules/c++/tiff/include/tiff/Header.h
index ed9da4f1e..60b9e8b67 100644
--- a/modules/c++/tiff/include/tiff/Header.h
+++ b/modules/c++/tiff/include/tiff/Header.h
@@ -19,11 +19,13 @@
* see .
*
*/
-
+#pragma once
#ifndef __TIFF_HEADER_H__
#define __TIFF_HEADER_H__
#include
+#include
+
#include "tiff/Common.h"
namespace tiff
@@ -34,7 +36,7 @@ namespace tiff
* @class Header
* @brief Contains TIFF header information
*********************************************************************/
-class Header : public io::Serializable
+class CODA_OSS_API Header : public io::Serializable
{
public:
enum ByteOrder { MM, II };
diff --git a/modules/c++/tiff/include/tiff/IFD.h b/modules/c++/tiff/include/tiff/IFD.h
index 9120f581a..ea5493db3 100644
--- a/modules/c++/tiff/include/tiff/IFD.h
+++ b/modules/c++/tiff/include/tiff/IFD.h
@@ -19,14 +19,16 @@
* see .
*
*/
-
+#pragma once
#ifndef __TIFF_IFD_H__
#define __TIFF_IFD_H__
#include