38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
//
|
||
// Created by DefTruth on 2021/7/17.
|
||
//
|
||
//define 了常见的宏:LITE_EXPORTS LITE_WIN32 NOMAXMIN __unused 等
|
||
|
||
#ifndef LITE_AI_LITE_AI_DEFS_H
|
||
#define LITE_AI_LITE_AI_DEFS_H
|
||
|
||
#include <iostream>
|
||
|
||
#ifndef LITE_EXPORTS
|
||
# if (defined _WIN32 || defined WINCE || defined __CYGWIN__)
|
||
# define LITE_EXPORTS __declspec(dllexport) // __declspec(dllexport) 指示编译器将函数或变量导出到动态链接库(DLL)中
|
||
# elif defined __GNUC__ && __GNUC__ >= 4 && (defined(__APPLE__)) // &&是二元运算符 defined是一元运算符,从左往右按需计算
|
||
# define LITE_EXPORTS __attribute__ ((visibility ("default")))
|
||
# endif
|
||
#endif
|
||
|
||
#if (defined _WIN32 || defined WINCE || defined __CYGWIN__)
|
||
# define LITE_WIN32
|
||
#elif defined __GNUC__ && __GNUC__ >= 4 && (defined(__APPLE__))
|
||
# define LITE_UNIX
|
||
#endif
|
||
|
||
#ifdef LITE_WIN32
|
||
# define NOMINMAX // 用在#include<windows.h>之前,用于禁止min/max宏定义
|
||
#endif
|
||
|
||
#ifndef LITE_EXPORTS
|
||
# define LITE_EXPORTS
|
||
#endif
|
||
|
||
#ifndef __unused
|
||
# define __unused
|
||
#endif
|
||
|
||
#endif //LITE_AI_LITE_AI_DEFS_H
|