Tag: 权限被拒绝

在Windows 7上使用GCC进行编译:\ mingw32 \ bin \ ld.exe:无法打开输出文件a.exe

这是我在尝试用gcc编译一个简单的hello world程序时得到的。 c:\>gcc hello.c hello.c:9:2: warning: no newline at end of file C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot open output file a.exe : Permission denied collect2: ld returned 1 exit status 它与Windows 7管理权限有关吗? 如果正在创建输出文件但无法打开,它位于何处? 对不起,如果这是一个noobie问题太多了。 到目前为止,我一直在使用Dev-C ++来编译我的源代码。 我尝试使用谷歌搜索错误,但我发现所有文件已经打开,但在任务管理器中没有提到这样的exe。 编辑:该文件也位于C:\ hello.c 如果我把它放在其他驱动器中,我能做到吗? 当我将文件放在D:\并尝试使用cd d:\将其更改为任何其他驱动器时不会更改驱动器。

C编译错误:Id返回1退出状态

出于某种原因,当我尝试编译程序时,编译器说权限被拒绝,Id返回1退出状态。 谁能告诉我这意味着什么? 谢谢 #include /* Library inclusions */ #include “genlib.h” #include “simpio.h” int binSearch(int val, int numbers[], int size1); /* prototypes */ void sortArray (int numbers[], int size1); int indexMax (int numbers[], int low, int high); void swap (int numbers[], int loc, int loc1); void getArray (int numbers[], int size1); void displayArray (int numbers[], int […]