开发者

How to define a macro in a makefile for enabling a feature in a C header?

I wan开发者_Go百科t to define a macro in one of the header files. Can I set it through a makefile?

For example, I want to set a macro "PAGING_ON" which I want to be a preprocessor macro for source files. (The project is in C.) Is it possible to set it through the Makefile?


Most of the compilers I know about have this option; for example, you can use compilation flag -D in gcc (-DPAGING_ON)

For Visual C (and variants) it is /D

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜