nv-cli-export-head-file
v1.0.3
Published
nv-cli-export-head-file ========== - cli-tool print a fixed-string-tmpl of dllexport/dllimport/__attribute__((visibility("default")))
Downloads
7
Readme
nv-cli-export-head-file
- cli-tool print a fixed-string-tmpl of dllexport/dllimport/attribute((visibility("default")))
install
- npm install nv-cli-export-head-file -g
usage
example
#nv_cli_export_head_file -n mymod
mymod.h
-------------------------------
{
prefix: 'MYMOD_EXPORT',
win: [ '_WIN32', 'BUILDING_MYMOD_SHARED', 'USING_MYMOD_SHARED' ],
lnx: [ 'BUILDING_MYMOD_SHARED' ]
}
-------------------------------
#ifndef MYMOD_EXPORT_H_
#define MYMOD_EXPORT_H_
#if defined(_WIN32)
#ifdef BUILDING_MYMOD_SHARED
#define MYMOD_EXPORT __declspec(dllexport)
#elif USING_MYMOD_SHARED
#define MYMOD_EXPORT __declspec(dllimport)
#else
#define MYMOD_EXPORT
#endif
#else
#ifdef BUILDING_MYMOD_SHARED
#define MYMOD_EXPORT __attribute__((visibility("default")))
#else
#define MYMOD_EXPORT
#endif
#endif
#endif
LICENSE
- ISC