开发者

Conditional compilation

How do I add conditional compilation to my make开发者_开发问答file: say if I have a #ifdef SAVE_DATA in a cpp (.cc) file.


Usually something like CXXFLAGS+=-DSAVE_DATA


For gcc et al, you can use the -Dfoo flag to define foo:

g++ -DSAVE_DATA=1 -c foo.cpp

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜