Code::Blocks Forums
User forums => Help => Topic started by: yanglianxiang on October 26, 2010, 09:28:50 am
-
C:\Program Files\CodeBlocks\MinGW\bin\ld.exe: cannot open output file C:\Program Files\CodeBlocks\MyProjects\backward.exe: Permission denied
all new files are locked,and .o files,after run,are also locked.
.exe files cannot be created.
-
C:\Program Files\CodeBlocks\MyProjects\backward.exe: Permission denied
You forgot to say anything about your OS, version of C::B et al. But if it's Vista or later than every user does not have write permission to the "Program Files" folder by default. So it makes no sense to place your projects there, use a writeable folder (like "My Files") for your projects.
-
first of all,thank you!
my os is win7,and my C::B is 8.02mingw.
i usually put my projects in the file myprojects.
after i reinstall my C::B,there is no file myprojects anymore.
-
after i reinstall my C::B,there is no file myprojects anymore.
I guess you didn't understand what I said: Put the C::B installation files under Program Files, but do not put your project files or any output folders under Program Files. This is not a limitation of C::B, but Windows starting with Vista does not allow writing into these folders without explicitly using the admin mode (elevated privileges) or setting directory / file permissions accordingly (by hand) which both is a very bad thing to do.
-
thank you,first!
But ,if I do not put my project files and output folders under Program Files,after I run my files,there will be lots of errors and warnings in the build messages.
-
That is another error.
The file-ending c makes C::B believes it's a C-file, but iostream is a c++ header, so you have to use cpp as file-ending.
-
Oh,I got it,thank you very much!