如何使用g ++使用-DN标志编译期间传递值(How to pass values during c

2019-07-21 08:10发布

I've heard that you can set values in your c++ program during compilation using g++'s -DN flag. Can anybody explain how? Thank you

Answer 1:

-DXXX标志就像是加入#define XXX 。 所以-DN=2是一样#define N 2

你可以使用此标志编译过程中传递值。

参考:

  • GCC预处理程序选项


文章来源: How to pass values during compilation with g++ using -DN flag