Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有任何测试宏可用于查看代码是否正在使用-lrt开关(POSIX.1b 实时扩展库)编译?我想在我的代码中围绕 using 部分使用clock_gettime它,这样如果-lrt在构建期间未指定,则不会使用它。
-lrt
clock_gettime
-lXXX是链接器标志;它仅在编译和预处理发生后才相关。所以不,没有宏可以做到这一点。
-lXXX