c - 如果定义(__AIX)不能在 AIX 6.1 上工作?

标签 c aix

我在 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/

相关文章:

在 AIX 5.3 版上编译 perl >5.10

c++ - 为什么来自 IBM XL C/C++ 编译器的警告?

copy - 在同一数据库DB2中创建表的副本

linux - AIX - 默认 shell - 箭头键

c - OpenSSL BIO 写入部分文件

c - SetConsoleCursorPosition : Getting black rows in console upon use

c - Fortran 编译和 C 编译的 DLL 是否应该能够互换导入? (x86 目标)

java - 在 AIX 上设置命令输出的列宽

C 代码 : Efficient way to parse through to end of LinkedList

c - 为什么 sizeof(my_arr)[0] 编译并等于 sizeof(my_arr[0])?