Author Topic: The file can't be build.  (Read 12269 times)

Offline Atomique

  • Single posting newcomer
  • *
  • Posts: 4
The file can't be build.
« on: January 07, 2014, 11:57:16 pm »
"It seem that this file has not been build yet.Do you want to build it?"
I got this error.I tried everything:uninstalling codeblocks,checking permissions,changing location of the file...I searched all the forum for an answer,but all of them didn't work.
When I try to compile a c++ program like hello world! it gives me that error.I don't know what to do.
I don't have installed an antivirus and my firewall is set off.Codeblocks have worked for 2 weeks, but for a few days it doesn't work.

mingw32-g++.exe   -c C:\Users\BodyD\Desktop\rapcapitulare.cpp -o C:\Users\BodyD\Desktop\rapcapitulare.o
Assembler messages:
Error: can't open C:\Users\BodyD\AppData\Local\Temp\ccy4A8ie.s for reading: Permission denied
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
That ccy4A8ie.s doesn't even exist...
« Last Edit: January 07, 2014, 11:59:26 pm by Atomique »

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: The file can't be build.
« Reply #1 on: January 08, 2014, 06:44:26 am »
Mingw needs read/write permission where ever the temp environment variable (%temp%) points to.

You need to run your compiler (well codeblocks too) with administration privileges.

Offline Atomique

  • Single posting newcomer
  • *
  • Posts: 4
Re: The file can't be build.
« Reply #2 on: January 08, 2014, 07:54:58 pm »
How to run mingw as administrator?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: The file can't be build.
« Reply #3 on: January 08, 2014, 08:30:42 pm »
Mingw needs read/write permission where ever the temp environment variable (%temp%) points to.

You need to run your compiler (well codeblocks too) with administration privileges.

I never run CB as Full administration and it works; note, I am using a Administrator account.

The problem is the lack of user permissions.

Stop using your desktop to build programming projects!
Stop using other special folders to do programming projects!

Delete the temp files it complains about not having access to after you re-boot windows.
(Note: The temp files likely will be gone after re-booting windows.)
Deleting the temp files will NEED Full administration permissions in some cases.

Tim S.
« Last Edit: January 08, 2014, 08:32:24 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Atomique

  • Single posting newcomer
  • *
  • Posts: 4
Re: The file can't be build.
« Reply #4 on: January 08, 2014, 09:42:24 pm »
I am the admin of the computer.I deleted the temp folder and I restarted my pc and the error is still there...

« Last Edit: January 08, 2014, 09:45:07 pm by Atomique »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: The file can't be build.
« Reply #5 on: January 08, 2014, 09:52:07 pm »
I am the admin of the computer.I deleted the temp folder and I restarted my pc and the error is still there...



FYI: Deleting the temp folder is likely a very bad idea; no idea if it is recreated correctly or not.

I suggest once more DO NOT USE special folders to build projects!!!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Atomique

  • Single posting newcomer
  • *
  • Posts: 4
Re: The file can't be build.
« Reply #6 on: January 08, 2014, 10:02:23 pm »
I tried to save the .cpp in D:\ and I got the same problem. This is even a special folder?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: The file can't be build.
« Reply #7 on: January 08, 2014, 11:16:00 pm »
I tried to save the .cpp in D:\ and I got the same problem. This is even a special folder?

All root folders have special rights under windows 7. Or at least "C:\" does.

I suggest "D:\projects" and please post a full re-build log. http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Tim S.
« Last Edit: January 08, 2014, 11:24:32 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org