Is there any test macro that can be used to see if the code is being compiled with the -lrt switch (POSIX.1b Realtime Extensions library)? I would like to use it in my code around sections using clock_gettime, so that it is not used if -lrt was not specified during the build.
Is there any test macro that can be used to see if the code
Share
-lXXXis a linker flag; it’s only relevant after compilation and preprocessing have occurred. So no, there is no macro that can do this.