So for some time now I keep having this problem:
on windows 7 (64bit), with Delphi 7 and Delphi XE2, if from within the IDE, I compile a program, run it, stop it, change it and rerun it I get this error message:
[Fatal Error] Cannot create output file «project1.exe»
I have no clue to what causes this. I googled for more information, but I could not find a solution.
There are two workarounds: either wait a minute or two, or delete project1.exe manually. Needless to say, this is unworkable.
I do not have a virus scanner, and no virus. Have full access to related folders. Run everything as Administrator.
So what causes this? And what can I do to fix it?
RRUZ
134k19 gold badges355 silver badges482 bronze badges
asked Aug 7, 2012 at 17:45
I have the feeling that when you try to rebuild the application, project1.exe is still running. Maybe it takes longer than it should to close. You can easily check by opening Task Manager and see if the process project1.exe is still active after you close the application.
answered Aug 7, 2012 at 18:01
DiegoDiego
7,1325 gold badges29 silver badges37 bronze badges
14
I’m on XE7 and occasionally experience the «Could not create output file» problem, f2039. Using sysinternals’ Process Explorer, I discovered an android debug process (adb.exe) had a lien on the compiled binary. Not sure why; there’s no android config in this particular win32 project I’m building. Anyway, killed adb.exe and all was good thereafter.
Some points. The target output directories were never being indexed. «Application Experience» mentioned elsewhere in this thread was running the entire time. And most of the time, I could manually delete the output binary despite XE7’s complaints. I noticed at one point, however, I could not delete the binary via the shell which provided the opportunity to locate the offending adb.exe via Process Explorer.
answered Feb 17, 2015 at 10:45
bvjbvj
3,23431 silver badges29 bronze badges
I faced the same problem and I solved it . It seems that in some unknown cases the exe application remains running .
The solution is simple . You must just follow the following steps :
- open the windows task manager
- Go to the ‘Processes’ tab
- click on the ‘Show processes from all users’ and Your exe will appear
- Choose it and press the ‘End Process’ button
And everything will be alright.
bummi
27k13 gold badges62 silver badges101 bronze badges
answered Jan 29, 2015 at 8:00
2
Try removing Castalia if you are using it. I spent 3 days trying to solve this problem, everything I could think of…file permissions, watching the file handles with process explorer. If I install Castalia 2013.3.4, the problem happens (I have steps to reproduce), and uninstalling it makes the problem go away.
Additionally, the IDE will crash if you have a ‘default debug desktop’ set, and try to run under the debugger using any other saved layout. (crash happens on the switch to the debug desktop).
answered Jul 29, 2013 at 0:41
2
I right clicked the application (in the project group window) and then selected CLEAN.
I was then able to compile the application.
answered May 7, 2014 at 16:17
In my case Problem solved by excluding project folder from antivirus real time protection.
Can you delete EXE file manually?If no , proccess is in memroy , Open task manager ,select your project, END task . you have some bug in code that prevents application terminate.
If it is not in process list , Then Try :
1-exclude folder from windows Indexing or 3rd party file search applications that index files
2-In windows seven activate application experince service
3-Exclude project folder from Anti virus realtime protection
UPDATE
I noticed that ,Even if you do all what i said above, you may get this error some times in Windows 7 randomly.specially when you compile project many times…first compiles will be OK but after ten or more times this problem will be occurred
answered Dec 8, 2017 at 7:21
answered Nov 30, 2018 at 15:42
MohsenBMohsenB
1,57917 silver badges29 bronze badges
1
Sometimes Microsoft Security Essentials holds the file after it was build in Delphi and you need to turn off real time protection.
To check which process holds the file, use Sysinternals Process Explorer: link. Use «Find handle» and type your exe name.
answered Oct 21, 2015 at 12:35
In my case it was due to the output folder that did not exist.
So what you can try is go to Project-> Options and under the Directories tab, change the output directory to a folder that exists and try again.
answered Feb 23, 2016 at 13:50
- Try to open the windows task manager
- go to process if you can not find your app in here
- then go to details tab you will find it.
I had the same problem and then I found it on details tab.
Dharman♦
29.3k21 gold badges80 silver badges131 bronze badges
answered Nov 14, 2019 at 4:22
1/29/2020: During the past week, I experienced this: Load a project in Delphi 7 on a Win 10 machine, compile it (successfully), run the project from inside of D7 (successful), recompile the project and get a «cannot create ….project1.exe». Upon reboot, can successfully compile and execute, but the second compile fails as the above.
I found that Dell Support Assist had an update 8 days ago (about the time this started), so I uninstalled it. After that, no problems with D7.
answered Jan 29, 2020 at 14:12
A solution that has worked for me, change project options -> Linking and leave it like that, then delete the executable manually and solved.Project options -> linking
answered Apr 22, 2020 at 7:04
Just save project as in another place. it works for me.
answered Sep 16, 2021 at 10:06
0
I seem to have fixed it by setting the compatibility mode to XP SP3. This also fixed another annoyance which made Alt-P not open bring up the Project menu.
EDIT: I didn’t have to re-enable my Application Experience. Still dead where it should be 
Right-click on your Delphi short-cut, Properties, then choose the Compatibility tab. Choose Run the program in compatibility mode for: Windows XP (Service pack 3).
(I also checked the Run this program as an administrator box, but you may choose not to do that.)
(This is for Delphi 7, as per the OP’s question, not for XE7, although it may work for that too.)
answered Nov 4, 2015 at 9:53
1
|
1 / 1 / 0 Регистрация: 06.11.2013 Сообщений: 22 |
|
|
1 |
|
|
05.06.2014, 20:03. Показов 23743. Ответов 17
При компиляции программы в окне Unit1.pas пишет: [Fatal error] Could not create output file ‘путь’
__________________
0 |
|
351 / 344 / 279 Регистрация: 21.05.2013 Сообщений: 1,312 |
|
|
05.06.2014, 20:13 |
2 |
|
невозможно создать файл
0 |
|
4881 / 2754 / 848 Регистрация: 04.10.2012 Сообщений: 10,039 |
|
|
05.06.2014, 20:15 |
3 |
|
Лада Келлер, у Вас ранее скомпилированная программа не висит в процессах? Добавлено через 1 минуту
1 |
|
1 / 1 / 0 Регистрация: 06.11.2013 Сообщений: 22 |
|
|
05.06.2014, 20:16 [ТС] |
4 |
|
droider, где и как это посмотреть?
0 |
|
4881 / 2754 / 848 Регистрация: 04.10.2012 Сообщений: 10,039 |
|
|
05.06.2014, 20:20 |
5 |
|
Лада Келлер, откройте диспетчер задач и в списке процессов посмотрите, есть ли там ранее запущенный exe. Добавлено через 1 минуту Не по теме:
среду программирования второй раз в жизни вижу хорошее начало. Многие после первого раза больше не открывают.
2 |
|
1 / 1 / 0 Регистрация: 06.11.2013 Сообщений: 22 |
|
|
05.06.2014, 21:30 [ТС] |
6 |
|
Нет, не висит Добавлено через 1 час 0 минут
0 |
|
4881 / 2754 / 848 Регистрация: 04.10.2012 Сообщений: 10,039 |
|
|
05.06.2014, 21:57 |
7 |
|
Лада Келлер, этот файл формируется при компиляции. Обычный exe.
0 |
|
1 / 1 / 0 Регистрация: 06.11.2013 Сообщений: 22 |
|
|
05.06.2014, 22:11 [ТС] |
8 |
|
droider, но я ни разу до этого ничего не запускала
0 |
|
пофигист широкого профиля 4602 / 3062 / 850 Регистрация: 15.07.2013 Сообщений: 17,660 |
|
|
05.06.2014, 22:19 |
9 |
|
Could not create output file ‘путь’ ‘путь’ покажи.
0 |
|
1 / 1 / 0 Регистрация: 06.11.2013 Сообщений: 22 |
|
|
05.06.2014, 22:22 [ТС] |
10 |
|
northener, ‘C:Program files(x86)BorlandDelrhi7ProjectsProject1.exe’
0 |
|
пофигист широкого профиля 4602 / 3062 / 850 Регистрация: 15.07.2013 Сообщений: 17,660 |
|
|
05.06.2014, 22:28 |
11 |
|
C:Program files Нет прав для записи в эту папку.
0 |
|
1 / 1 / 0 Регистрация: 06.11.2013 Сообщений: 22 |
|
|
05.06.2014, 22:33 [ТС] |
12 |
|
Нет прав для записи в эту папку. Почему нет? И что делать?
0 |
|
пофигист широкого профиля 4602 / 3062 / 850 Регистрация: 15.07.2013 Сообщений: 17,660 |
|
|
05.06.2014, 22:40 |
13 |
|
Решение
Почему нет? И что делать? Потому что начиная с Windows Vista пользовательским программам это запрещено.
1 |
|
1 / 1 / 0 Регистрация: 06.11.2013 Сообщений: 22 |
|
|
05.06.2014, 23:12 [ТС] |
14 |
|
northener, спасибо, помогло!
0 |
|
0 / 0 / 0 Регистрация: 01.04.2015 Сообщений: 5 |
|
|
19.01.2016, 01:29 |
15 |
|
А что делать если сохранил не на «С» а просто на «D» и программа раньше работало, но спустя месяц она выдало эту ошибку «fatal error could not create output file» и потом просто весит в диспетчере пока не перезагрузишь, хотя раньше не открывал и в диспетчере не висела???
0 |
|
пофигист широкого профиля 4602 / 3062 / 850 Регистрация: 15.07.2013 Сообщений: 17,660 |
|
|
19.01.2016, 02:01 |
16 |
|
А что делать если сохранил не на «С» а просто на «D» и программа раньше работало, но спустя месяц она выдало эту ошибку «fatal error could not create output file» и потом просто весит в диспетчере пока не перезагрузишь, хотя раньше не открывал и в диспетчере не висела??? Если сам не в состоянии найти свои ошибки, прикладывай проект к сообщению. Буде время — поможем.
0 |
|
0 / 0 / 0 Регистрация: 01.04.2015 Сообщений: 5 |
|
|
19.01.2016, 17:56 |
17 |
|
Проект не причем — он полностью рабочий (проверял на других ПК). дело в самой делфи или возможно с ПК. перепробовал многое, все равно не работает. может что посоветуете..
0 |
|
4881 / 2754 / 848 Регистрация: 04.10.2012 Сообщений: 10,039 |
|
|
19.01.2016, 18:06 |
18 |
|
может что посоветуете без проекта можно только гадать на основе Ваших слов о том, что
Проект не причем
0 |
How to install Delphi 7 on
Windows 7 is no different from installing other software, open the windows
installer or setup file, then enter the serial number that is already
available, anyway, you could say it makes no difference as installing other
software, just maybe some of my friends master Delphi 7 its not complete, so
the warning window (warning windows) the installation procedure, for which
there are three options, namely: Abort (foils), Try Again (Try again) and the
Ignore (Ignore), select Ignore each time a warning window (warning windows)
appears.
Then after install Delphi 7 on Windows 7, then try to open the
Delphi program with a shortcut named Delphi 7 which has been available in the
All Programs, if not open the following folders:
C: Program Files Borland Delphi7 Bin
and find there an application file named Delphi 7 (usually size
533 kB), and open the file, so the window will appear as below:
Then click Run Program, it
will show a window like the following:
Unable
to rename ‘C: Program Files Borland Delphi7 Bin delphi32 .$$$’ to’ C:
Program Files Borland Delphi7 Bin delphi32.dro ‘
Then if you click OK, then the program Delphi 7 will be open but for the form
of work sheets does not appear, to overcome this, do the following steps:
- Open
the folder C: Program Files Borland Delphi7 so it would seem the top
folder named bin and a folder named Projects. Now we will begin the
first Bin folder, right-click the Bin folder and select Properties,
uncheck the blue or check the Read-only attributes (Only apllies to files
in a folder), so the box Read-only attributes (Only APPLIES to files in a
folder ) and Hidden blank check and clean, with no blue color, then click
Apply, click OK, click Continue, and finally click OK - Still
in the Bin folder, right-click the Bin folder, click Properties and open
the Security tab, click Edit and check Allow on Full information control,
Modify, Read and execute, List folder contens, Read and Write (usually by
check settings on the description Full control then the other will
automatically terberi tick by itself), then click Apply, click OK and
finally click OK - Projects
now in the folder, do the same thing has been done in the Bin folder of
this folder Projects. - And
now the vinegar folder C: Program Files Borland Delphi7 Bin from
the search for the application configuration file named delphi32 (usually
size 533 kB), right-click on the file and click Properties, go to the
compability tab and check the box on the left » Run this program as
an administrator «, then click OK - Then
right-click the file again delphi32, choose the second option (under the
Open) Run as administrator and friend, God willing Delphi will work fine
in Windows 7
If not successful please try the second solution
below:
- Close
the program once Delphi 7, open the folder C: Program Files Borland
Delphi7 Bin, and locate the file named delphi32.dro then the file should
be replaced with the results of the uninstall file delphi32.dro Delphi 7
on Windows 7, so we have to install first dong Delphi 7 on Windows
XP? should anyway so, to get the file delphi32.dro results uninstall
on Windows XP, but on the internet friends of cyberspace is to upload a
file delphi32.dro the uninstall on Windows XP, please download here - After
that, copy paste the files downloaded just now in the folder C: Program
Files Borland Delphi7 Bin with the intention of replacing the file
delphi32.dro results uninstall files in Windows 7 with the results
delphi32.dro uninstall on Windows XP. Now try to reopen the program
Delhi 7, Delphi 7 program was open to normal
Now
please be tested or attempted to create a program that’s as simple as the sum
of two numbers program and try running (Run) program, if the current program to
diRunkan means Delphi 7 is already open through the Administrator user, if the
program is unworkable or diRunkan, it will message appears below:
[Fatal
Error] Could not create output file ‘C: Program Files Borland Delphi7
Projects Project1.exe’
How do
I fix this? Do the following steps:
- Make sure there are no Delphi 7 application program
that opens in addition to the work sheet work sheet form, close the
application file and try running (Run) program. - If there is no Delphi application file (. Exe) being
open means that the program does not open the Delphi 7 friends through the
Administrator, how do I fix this? Do it again the following steps:
·
Close the first program
as a whole Delphi 7 friends
·
Open the folder C:
Program Files Borland Delphi7 Bin
·
Find the file named
delphi32 application (usually size 533 kB)
·
Right-click on the file,
select Properties, open the Compatibility tab and check the box Run this
program as an administrator, then click OK
·
Right-click the file
again and select Run as administrator as shown below:
Now try to create again a
simple program, and everything is normal right?



Сообщение было отмечено Лада Келлер как решение


