我有一个像这样写的C++预处理器:
#ifdef cpp_variable
//x+y;
#endif
Run Code Online (Sandbox Code Playgroud)
请有人告诉我如何在Makefile中定义它.
谢谢!
fou*_*nes 28
搜索编译器文档以了解如何执行此操作.
例如,g++语法是:
g++ -Dcpp_variable <other stuff>
Run Code Online (Sandbox Code Playgroud)
这对应于添加
CPPFLAGS += -Dcpp_variable
Run Code Online (Sandbox Code Playgroud)
在你的makefile中.
| 归档时间: |
|
| 查看次数: |
60594 次 |
| 最近记录: |