I have a strange problem with eclipse, when I want to build a file I get the error:
c:/sysgcc/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.1/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file Blok 2 week 1a.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
I only get this error when I have at least build the file once successfully. I have looked if the file was still running(in task manager, debug view, console), but it isn't. The error does not go away after closing eclipse. Only after rebooting my computer I am able to build the file again.
I have really no idea how I could solve this problem. I hope there is someone who could help me with this.
Thanks in advance.......
Related
error screenshot
I just installed Minix and tried to use mined a shutdown function. I got the error 12. I tried to google it, but I couldn't find anything. How can I change shutdown's source code?
p.s. I also tried to cd /shutdown but it didn't worked. and I couldn't vi /shutdown and I googled "Minix segmentation fault" and I found nothing.
shutdown is a binary file with the executable code. mined was probably not able to deal with such a large file. The file you want to edit is named shutdown.c.
I have installed MinGW on Windows 7
i did write a hello world app...
#include <stdio.h>
void main()
{
printf("Hallo, Welt!\n");
};
i did run
gcc Hello.c -o Hello
this did create a exe app named Hello.exe
I did run it and it said hello as it should
I did add a comment to the file, save it, and rerun the compiler in CMD as Admin
then i got error
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot open output file Hello.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
So i did try to delete the file in the windows file explorer
a window did pop up and did ask me to use administrator rights to delete the file
so i did permit this admin rights as i am admin
then it did popup a other message ... i need some rights from the computer it self
i dont know what i should do now ... i am admin of the computer and i cant delete the file ... if i rightclick the file and open the file settings and there the permissions i see the admin should have all permissions.
the file is not running as i see it ... the file is not locked by any thing
what is wrong ... is it because of the code or the compiler or is it a window thing ... how can i kill this file?
Edit:
The file is not running ... in Taskmanager when displaying all tasks of any user the file dos not appear any how and is not running.
Antivirus is off and it has no influence on the problem
i did also try with firewall off
the file keeps unkillable.
I Found a solution... as it seems, until now...
I did delete C:\MinGW
I did reinstall MinGW as as admin, in the install process i did check the option to install it for all users
I did a check for the Windows Path variable in the System Settings, just to be sure it is still there for C:\MinGW\bin.
then i did try again to compile the file Hello.c and the error did appear again.
So i did create a new folder for the source C:\My_C_Files
Now i did right click it in the windows file explorer and whent to the folder properties to play around with the file/folder permissions.
I gave wide rights to the user and all rights to the admin, namely such as allow to create subfolders read permissions delete write read change and just most to the user and the admin hat it all.
I gave also ownership to the user and admin
And all this rights i did apply to any subcontent of the folder even if it was empty.
Then i did copy my *.c source code file into this new folder.
I did try again to compile it from the CMD console, first once, as it did always work, then again, where the problem always did appear... this time it did work and overwrite the *.exe file again and again, to be sure i did delete the *.exe and recompile it and it did still work.
Conclusion: It has some thing to do with the Folder Permission of the Source or Destination Folder and the permission of its content and/or the Ownership of the desired folder.
now i have no longer ld.exe or collect2.exe - permission error's as returned 1 exit status with gcc.
May this info will help others who get into this error, i saw some on google, most say the app is running but this was not the case, others suggest to enable some windows services which did not help me, others talk about permission but mostly vague hints, some talk about symlinks and other crazy stuff. Here is what i found, windows permission to folder and content for user and admin.
Thanks to every one who did try to help me.
I've been trying to setup Eclipse for some C developing. I manage to get the example "hello world" program (provided by Eclipse) to compile, however I am unable to run or debug it. Since I am able to compile, I assume that the setup for the compiler is correct, I can also find the executable file in the workspace (which will not run manually).
While trying to run it through Eclipse I get the error "Error Starting Process - Launching Failed, Cannot run program".
While trying to debug it from Eclipse, I get the error "Error in final launch sequence: Failed to execute MI command: -exec-run" and "Error creating process %path to executable%(error 5)".
I've tried changing workspace to one that has no spaces and to reinstall the compiler (MinGW) with no success.
If anyone could provide some insight on the problem I'd be very grateful.
Edit: Attempting to run the executable returns the following error: "Windows cannot access the specified device, path or file. You may not have the appropriate permissions to access the item." This is strange as I am running it as an admin on my machine.
Furthermore, attempting to run the executable from an administrator permission level command prompt window returns "access is denied".
It turned out my anti-virus software was blocking the file's execution, disabled it and the program ran just fine.
I create a program to auto start with Windows, using registry:
CURRENT_USER\Microsoft\Windows\CurrentVersion\Run
when Windows starts, the program starts too, the problem is that on auto start he can't manipulate files, when I open the program he can do everything.
Using GetLastError I can see the error code is 5: access denied, strerror return "access denied" and using FormatString the message is something like: "Error description 5: Access denied.
Can someone explain why is this hapening?
The program was starting from System32, so to create the files in the exe dir, is better use GetModuleFileName.
I almost managed to deploy a CakePHP-application on CentOS-server, but it still needs little configuration. I have enabled mod_rewrite in /etc/httpd/conf/httpd.conf and restarted apache-server.
Then I have put Cake core library in /home/user/cakephp-core/
I get message "500 internal error" when i try to go to this page through web-browser.
In apache-logs I found following messages:
PHP Warning: include(/$HOME/cakephp-core/lib/Cake/bootstrap.php): failed to open stream: Permission denied in /srv/www/site/public_html/main/index.php on line 96
PHP Warning: include(): Failed opening '/$HOME/cakephp-core/lib/Cake/bootstrap.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /srv/www/site/public_html/main/index.php on line 96
PHP Fatal error: CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/index.php. It should point to the directory containing your /cake core directory and your /vendors root directory. in /srv/www/site/public_html/main/index.php on line 101
it says something about "permission denied"... to whom I should give permissions and where? I gave "apache:apache" to tmp/-folder... Any ideas?
Simply read the log and try to understand it.
It pretty clearly tells you what has insufficient permissions. The linux command to set permissions is chmod. You also want to make sure, as the text already tells you, that your CakePHP core include path is correct. Double check that too.