#错误您必须定义平台宏
#error you must define the platform macro
我有一个项目要编译,它给了我以下错误:
In file included from c:/acrobatxsdk/Adobe/Acrobat 10 SDK/Version 1/PluginSupport/Headers/API/PIMain.c:21:0:
c:/acrobatxsdk/Adobe/Acrobat 10 SDK/Version 1/PluginSupport/Headers/API/Environ.h:37:2: error: #error You must define the PLATFORM macro
c:/acrobatxsdk/Adobe/Acrobat 10 SDK/Version 1/PluginSupport/Headers/API/Environ.h:41:10: error: #include expects "FILENAME" or <FILENAME>
c:/acrobatxsdk/Adobe/Acrobat 10 SDK/Version 1/PluginSupport/Headers/API/Environ.h:52:2: error: #error PLATFORM failed to #define ACCB1
PIMain.c看起来像这样:
#if WIN_PLATFORM
#include "WinCalls.h"
#elif MAC_PLATFORM
#include "MacCalls.h"
#elif UNIX_PLATFORM
#include "UnixCalls.h"
#else
#error platform not defined
#endif
我知道,如果需要的话,唯一的修正案是在《环境法》中做出的,有人能建议怎么做吗?
Environ.h
正在查找PLATFORM
指令,如果您不定义它,则会有一个预处理器或编译时标志来"抛出"错误。请在此处查看#error
指令的工作原理(MSDN链接)。
我找到了Environ.h
:的代码
#ifndef PLATFORM
#ifdef WIN_ENV
#define PLATFORM "winpltfm.h"
#elif __OS2__
#define PLATFORM "os2pltfm.h"
#elif defined(unix) || defined(__unix)
#define PLATFORM "UnixPlatform.h"
#else
#error You must define the PLATFORM macro
#endif
#endif
您显然没有在受支持的平台上运行。
相关文章:
- 在提升multi_index容器中,是否定义了"default index"?
- 正在查找文档以获得PS4平台的C++中的设备信息
- #定义c-预处理器常量..我做错了什么
- 用C++中的一个变量定义一个常量
- 部分定义/别名模板模板参数
- C++映射:具有自定义类的运算符[]不起作用(总是返回0)
- #为""定义宏;静态";针对不同的上下文
- 如何确保C++函数在定义之前声明(如override关键字)
- 创建一个函数以在输入为负数或零时输出字符串.第一次执行用户定义的函数
- 当类在C++中定义时,有什么方法可以"register"类吗?
- 在命名空间中定义函数还是限定函数
- 此代码是否违反一个定义规则
- #错误您必须定义平台宏
- GCC可以用于编译到自定义平台吗
- 移动平台的预处理器定义是什么?
- 在c++中为每个平台定义函数的首选方式是什么
- (C++/WP8)为 WP8 平台定义的平台宏是什么?
- Bazel平台特定的C++定义
- Visual Studio makefile项目的自定义平台
- #error:请定义您的平台