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.
为了避免一大堆strdup错误,我必须始终包含-D_BSD_SOURCE在我的编译语句中。有没有办法我可以以某种方式将它包含在我的.c文件中,并且永远不再将它包含在我的编译语句中。
strdup
-D_BSD_SOURCE
.c
在 .c 文件的顶部,在包含之前,放置以下内容:
#define _BSD_SOURCE