News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

help!!!

Started by yanglianxiang, October 26, 2010, 09:28:50 AM

Previous topic - Next topic

yanglianxiang

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.

MortenMacFly

Quote from: yanglianxiang on October 26, 2010, 09:28:50 AM
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

yanglianxiang

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.

MortenMacFly

Quote from: yanglianxiang on October 26, 2010, 12:05:04 PM
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

yanglianxiang

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.

Jenna

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.

yanglianxiang

Oh,I got it,thank you very much!