Recent

Author Topic: Error: Can't create object file ; Fatal: Can't create executable  (Read 62464 times)

dfspannie

  • New Member
  • *
  • Posts: 24
I get the following error when compiling the program I am working on :
 Error: Can't create object file
Fatal: Can't create executable

What I can't understand is that the program has been compiling and running without any problems. I added a form (empty at this stage), and since then the above errors.
Thanx.

Win XP Sp 3
Lazarus 9.26.2
FPC 2.2.2

dfspannie

  • New Member
  • *
  • Posts: 24
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #1 on: December 16, 2009, 09:20:16 pm »
The problem seems to have sorted itself out.
I got tired of fiddeling with the program, shut down the computer and went to bed.
When I started up again, the program compiled and ran witout any problems. Perhaps it just wanted a reboot. Does this constitute a bug that need to be reported ?  :-\

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #2 on: December 16, 2009, 09:57:45 pm »
It is possible that your executable file was locked by another Lazarus instance. Upon reboot it was unlocked.
Lazarus/FPC on Linux

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #3 on: December 17, 2009, 08:56:28 am »
Another chance is that you forgot to reset the debugger (it will lock your exe while debugging).

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2583
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #4 on: December 17, 2009, 11:00:01 am »
Another chance is that you forgot to reset the debugger (it will lock your exe while debugging).
Thats fixed a long time ago. When debugging is stopped, the exe name is reset
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

amar_arifin

  • Newbie
  • Posts: 4
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #5 on: January 28, 2011, 07:41:02 am »
i,m already have same problem with him..

message..

project1.lpr(22,1) Error: Can't create object file: C:\Users\Mohd kamarrul arifin\Desktop\LAST_0ne - Copy\project1.exe
project1.lpr(22,1) Fatal: Can't create executable C:\Users\Mohd kamarrul arifin\Desktop\LAST_0ne - Copy\project1.exe

so..what should i do??
plizz...
 i,m realy noob about this prgamming..

help mE !!!  :'( %) :-\

amar_arifin

  • Newbie
  • Posts: 4
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #6 on: January 28, 2011, 07:42:32 am »
please tell me the step to solve it.. :'(

Imants

  • Full Member
  • ***
  • Posts: 196
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #7 on: January 28, 2011, 12:58:31 pm »
If even after reseting computer or reseting debugger (lazarus menu->run->reset debuges) or killing gdb.exe process on windows didn't work try to put your project in folder without spaces I think FPC has problems with that

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11445
  • FPC developer.
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #8 on: January 28, 2011, 01:15:56 pm »
IIRC 0.9.26 and older had problems with dirs with spaces in it. Save your project to a directory without spaces in  it before compiling.

bobihot

  • New Member
  • *
  • Posts: 36
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #9 on: August 21, 2012, 06:11:32 pm »
Hi,
Me and now is given this error:
kia1a.lpr(20,1) Error: Can't create object file: kia1a.exe

Lazarus 1.0 RC1 r38085 FPC 2.6.0 i386-win32-win32/win64

Win XP SP3
no space on the project path?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #10 on: August 22, 2012, 12:07:54 am »
Quote
Me and now is given this error:
kia1a.lpr(20,1) Error: Can't create object file: kia1a.exe
No gdb / program instance running in task manager?

bobihot

  • New Member
  • *
  • Posts: 36
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #11 on: August 22, 2012, 01:00:37 pm »
Hi,
No gdb process.
On home I think worked properly. At work have multiply profiles and maybe from this? But compiling: ppc386 is starting corectly and no problem? The working directory is on a neutral place and no connected with profile. This give always- from different profiles with Administrative rights.
I must to delete .exe file befour compiling and has not problems- file is not locked and compile successfully in this case.
Thanx

bobihot

  • New Member
  • *
  • Posts: 36
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #12 on: September 08, 2012, 09:16:25 pm »
Hi,
I solved this problem when making admin account with password?
Been interested, that with TotalCmd and windows explorer was possibility to delete .exe file, with DoubleCmd and .bat file wont.
This is for peoples which have same problem.
Thanx

opisska

  • Newbie
  • Posts: 3
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #13 on: November 09, 2012, 04:47:11 pm »
I am getting the same error consistently on Windows 7. I have to wait several minutes before recompiling my program after each test and it gets really annoying really fast.

I did nothing fancy, just made a file in the IDE and run it, it's a couple of lines, rudimentary processing a text file. Tried the fpc command-line compiler, the result is the same. After running the program, the .EXE si locked for a while and I can't delete it in windows, can't del /f as administrator.

I got this error using 2.4.2, downloaded the latest 2.6.0, error persists. I have no idea why it started doing it now. There are no spaces in the path or name, nothing changed on my computer ...

If this goes on, I will probably have to learn another language? There is no reasonable compiler for Pascal other than freepascal. I am getting desperate, being locked out of my work.

edit: okay, I found a "workaround" - renaming the source before every compilation. But that is not really far in terms of comfort neither.
« Last Edit: November 09, 2012, 05:06:31 pm by opisska »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #14 on: November 10, 2012, 04:53:00 am »
Probably something wrong with the OS or environment (e.g.: antivirus. F-Secure for instance, really hates Pascal/Delphi programs, don't know why). You can try changing OS (last Windows I use is XP, and Lazarus is working well there, I never had this kind of executable locking problem).

 

TinyPortal © 2005-2018