sun*_*107 0 c windows memory-management
全部,需要一些帮助.我来自纯粹的Java背景,对C编程知之甚少.基本上我需要编写一个C程序(并创建一个可执行文件),它将在Windows机器上输出自由字节数(RAM)(XP/2008/7)
我对它做了一些研究,发现有一个名为GlobalMemoryStatusEx的函数,还有一个链接:http://msdn.microsoft.com/en-us/library/aa366589(v = vs.85) .aspx
我用gcc安装了cygwin,上面的程序甚至都没有为我编译.我知道我在做一些愚蠢的事情..
$ gcc hello.c -o hello.exe
hello.c:3:19: error: tchar.h: No such file or directory
hello.c: In function `main':
hello.c:7: error: `MEMORYSTATUSEX' undeclared (first use in this function)
hello.c:7: error: (Each undeclared identifier is reported only once
hello.c:7: error: for each function it appears in.)
hello.c:7: error: expected `;' before `statex'
hello.c:9: error: `statex' undeclared (first use in this function)
Run Code Online (Sandbox Code Playgroud)
很感谢任何形式的帮助!
| 归档时间: |
|
| 查看次数: |
924 次 |
| 最近记录: |