Home > Support > ConfigMacros

Configuration Macros

You can define the following macros before including any HnxGC header files to change the default behaviors of HnxGC. For example, you can define HNXGC_CONFIG_NO_DEFAULT_NAMESPACE macro before "hnxGC.h" to use explicit namespace qualifier for HnxGC symbols as below.

#define HNXGC_CONFIG_NO_DEFAULT_NAMESPACE

#include "hnxGC.h"

int main()
{
    using harnix::gcptr;        // explicit using `harnix' namespace qualifier

    gcptr<int> p = gcnew int;

    return 0;
}

Descriptions of Configuration Macros

Configuration Macro Description
HNXGC_CONFIG_NO_DEFAULT_LIB By default, HnxGC will automatically use #pragma comment (lib, ...) to place a library-search record in object file to instruct linker to search for "HnxGC.lib". Define this macro will disable this feature and requires user to explicitly link with a proper HnxGC library.
HNXGC_CONFIG_NO_DEFAULT_NAMESPACE By default, HnxGC will use "using namespace" directive to allow people using symbols without explicit namespace qualifier. Define this macros will skip this action to avoid namespace conflicts.
HNXGC_CONFIG_NO_EXTENDED_UTIL By default, the header file "hnxGC.h" will include some extended utilties header files. Define this macro will exclude these extended header files, you have to explicitly include them by yourself.
HNXGC_STRICTCHECK Define this macro will enable more runtime checkings. Note: this macro will introduce some extra costs and is not recommended for a release version of application program.
HNXGC_APP_DLL Must define this macro when building a HnxGC application DLL.
HNXGC_APP_DL_DLL Must define this macro when building a HnxGC application DLL for run-time dynamic linking in an operating system prior than Windows Vista.
Home | Download | Terms of Use | Privacy Statement | Contact Us
Copyright@ 2008 hnxgc.harnixworld.com, All rights reserved.