我在 AIX 6.1 上有以下内容:
#include <stdio.h>
#include <stdlib.h>
int main(){
#if defined(__AIX)
printf("hello world");
#endif
return 0;
}
我已按照 http://predef.sourceforge.net/preos.html#sec2 中的说明进行操作但是我在摸不着头脑,为什么在我运行它时它不起作用或打印出“hello world”?
如果我在框中执行“uname”,我会得到“AIX”...并且“uname -v”返回“6”...
有什么想法可以放入代码中吗?
感谢帮助
林顿
最佳答案
在“AIX”之前应该是 1 个下划线而不是 2 个下划线……现在解决了 ;-)
关于c - 如果定义(__AIX)不能在 AIX 6.1 上工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7819918/