Crypto++  8.5
Free C++ class library of cryptographic schemes
Macros
config_dll.h File Reference

Library configuration file. More...

Go to the source code of this file.

Macros

#define CRYPTOPP_IMPORTS   ...
 Win32 define for dynamic link libraries. More...
 
#define CRYPTOPP_EXPORTS   ...
 Win32 define for dynamic link libraries. More...
 
#define CRYPTOPP_IS_DLL
 Win32 define for dynamic link libraries. More...
 
#define CRYPTOPP_DLL_TEMPLATE_CLASS   ...
 Instantiate templates in a dynamic library. More...
 
#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS   ...
 Instantiate templates in a dynamic library. More...
 
#define CRYPTOPP_STATIC_TEMPLATE_CLASS   ...
 Instantiate templates in a dynamic library. More...
 
#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS   ...
 Instantiate templates in a dynamic library. More...
 
#define CRYPTOPP_TABLE   extern
 Override for internal linkage. More...
 
#define CRYPTOPP_API   ...
 Win32 calling convention. More...
 

Detailed Description

Library configuration file.

config_dll.h provides defines for shared objects and dynamic libraries. Generally speaking the macros are used to export classes and template classes from the Win32 dynamic link library. When not building the Win32 dynamic link library they are mostly an extern template declaration.

In practice they are a furball coughed up by a cat and then peed on by a dog. They are awful to get just right because of inconsistent compiler support for extern templates, manual instantiation and the FIPS DLL.

config.h was split into components in May 2019 to better integrate with Autoconf and its feature tests. The splitting occurred so users could continue to include config.h while allowing Autoconf to write new config_asm.h and new config_cxx.h using its feature tests.

Note
You should include config.h rather than config_dll.h directly.
See also
Issue 835, Make config.h more autoconf friendly, Configure.sh script, Visual Studio, and FIPS DLL on the Crypto++ wiki
Since
Crypto++ 8.3

Definition in file config_dll.h.

Macro Definition Documentation

◆ CRYPTOPP_IMPORTS

#define CRYPTOPP_IMPORTS   ...

Win32 define for dynamic link libraries.

CRYPTOPP_IMPORTS is set in the Visual Studio project files. When the macro is set, CRYPTOPP_DLL is defined to __declspec(dllimport).

This macro has no effect on Unix & Linux.

See also
Visual Studio, and FIPS DLL on the Crypto++ wiki

Definition at line 45 of file config_dll.h.

◆ CRYPTOPP_EXPORTS

#define CRYPTOPP_EXPORTS   ...

Win32 define for dynamic link libraries.

CRYPTOPP_EXPORTS is set in the Visual Studio project files. When the macro is set, CRYPTOPP_DLL is defined to __declspec(dllexport).

This macro has no effect on Unix & Linux.

See also
Visual Studio, and FIPS DLL on the Crypto++ wiki

Definition at line 55 of file config_dll.h.

◆ CRYPTOPP_IS_DLL

#define CRYPTOPP_IS_DLL

Win32 define for dynamic link libraries.

CRYPTOPP_IS_DLL is set in the Visual Studio project files.

See also
Visual Studio, and FIPS DLL on the Crypto++ wiki

Definition at line 62 of file config_dll.h.

◆ CRYPTOPP_DLL_TEMPLATE_CLASS

#define CRYPTOPP_DLL_TEMPLATE_CLASS   ...

Instantiate templates in a dynamic library.

CRYPTOPP_DLL_TEMPLATE_CLASS decoration should be used for classes intended to be exported from dynamic link libraries.

This macro is primarily used on Win32, but sees some action on Unix & Linux due to the source file dll.cpp.

See also
Visual Studio, and FIPS DLL on the Crypto++ wiki

Definition at line 72 of file config_dll.h.

◆ CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS

#define CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS   ...

Instantiate templates in a dynamic library.

CRYPTOPP_EXTERN_DLL_TEMPLATE_CLASS decoration should be used for template classes intended to be exported from dynamic link libraries.

This macro is primarily used on Win32, but sees some action on Unix & Linux due to the source file dll.cpp.

See also
Visual Studio, and FIPS DLL on the Crypto++ wiki

Definition at line 82 of file config_dll.h.

◆ CRYPTOPP_STATIC_TEMPLATE_CLASS

#define CRYPTOPP_STATIC_TEMPLATE_CLASS   ...

Instantiate templates in a dynamic library.

CRYPTOPP_STATIC_TEMPLATE_CLASS decoration should be used for template classes intended to be exported from dynamic link libraries.

This macro is primarily used on Win32, but sees some action on Unix & Linux due to the source file dll.cpp.

See also
Visual Studio, and FIPS DLL on the Crypto++ wiki

Definition at line 92 of file config_dll.h.

◆ CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS

#define CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS   ...

Instantiate templates in a dynamic library.

CRYPTOPP_EXTERN_STATIC_TEMPLATE_CLASS decoration should be used for template classes intended to be exported from dynamic link libraries.

This macro is primarily used on Win32, but sees some action on Unix & Linux due to the source file dll.cpp.

See also
Visual Studio, and FIPS DLL on the Crypto++ wiki

Definition at line 102 of file config_dll.h.

◆ CRYPTOPP_TABLE

#define CRYPTOPP_TABLE   extern

Override for internal linkage.

CRYPTOPP_TABLE can be used to override internal linkage on tables with the const qualifier. According to C++ rules a decalration with const qualifier is internal linkage.

Note
The name CRYPTOPP_TABLE was chosen because it is often used to export a table, like AES or SHA constants. The name avoids collisions with the DLL gear macros, like CRYPTOPP_EXPORTS and CRYPTOPP_EXTERN.

Definition at line 111 of file config_dll.h.

◆ CRYPTOPP_API

#define CRYPTOPP_API   ...

Win32 calling convention.

CRYPTOPP_API sets the calling convention on Win32. On Win32 CRYPTOPP_API is __cedcl. On Unix & Linux CRYPTOPP_API is defined to nothing.

See also
Visual Studio on the Crypto++ wiki

Definition at line 119 of file config_dll.h.