Recent

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

opisska

  • Newbie
  • Posts: 3
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #15 on: November 10, 2012, 12:31:13 pm »
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).

Thanks, but I am not using an antivirus and there is virtually nothing running in background (graphic and touchpad drivers and that's it). Changing an OS is definitiely a possible solution (it works in my virtual Ubuntu, for example) but it's quite a shame that it does not work on the current major version of the most widely used OS, isn't it?

As I said, there is a workaround in changing the name, but anything is just a workaround, causing additional problems.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #16 on: November 10, 2012, 01:02:10 pm »
If you consistently see this problem, I'd file a bug (if one hasn't been filed already).
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11986
  • FPC developer.
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #17 on: November 10, 2012, 03:22:50 pm »
Since the behaviour with current versions is very rare, I think a bugreport without an idea where the problem is (what makes that machine special in this regard) is pretty useless, since it wouldn't help reproducing the problem situation

Make sure that there are no versions of the application still running (taskmgr).


howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #18 on: November 10, 2012, 06:55:50 pm »
This sounds like a problem with  the Windows Application Experience service. If this service is not running it causes problems with every executable that is changed (whether or not it is in Program Files or Program Files(x86)). Lack of this service causes very aggressive Windows self-defence default behaviour to surface, and being Administrator doesn't help at all.
If you click the Windows Start button and type "services.msc" (without the quotes) it starts a GUI services configuration program where you can make sure Application Experience is not Stopped.
Right-clicking on the service lets you change the properties (e.g. to Automatic, if it is Disabled or Manual or Stopped). You may wish to minimise the number of Windows services that always run, but this is one that no Windows developer can afford to turn off. I think sometimes Windows Updates may affect the setting, since it has come back to haunt me recently a couple of times, not because I have changed the settings myself.

opisska

  • Newbie
  • Posts: 3
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #19 on: November 28, 2012, 12:30:54 pm »
This sounds like a problem with  the Windows Application Experience service. If this service is not running it causes problems with every executable that is changed (whether or not it is in Program Files or Program Files(x86)). Lack of this service causes very aggressive Windows self-defence default behaviour to surface, and being Administrator doesn't help at all.
If you click the Windows Start button and type "services.msc" (without the quotes) it starts a GUI services configuration program where you can make sure Application Experience is not Stopped.
Right-clicking on the service lets you change the properties (e.g. to Automatic, if it is Disabled or Manual or Stopped). You may wish to minimise the number of Windows services that always run, but this is one that no Windows developer can afford to turn off. I think sometimes Windows Updates may affect the setting, since it has come back to haunt me recently a couple of times, not because I have changed the settings myself.

Thanks so much indeed, it works! I have no idea why the service was stopped, but now I can finallly work without renaming files a hundred times a day.

NoReason

  • New Member
  • *
  • Posts: 21
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #20 on: June 19, 2016, 03:39:57 am »
This is bug when u use form1.hide or something and close wrong form, and program will still work....
soo just open task manager and processes and 'end proces project1(name of project)'
i think i help.
sry for bad english

Thaddy

  • Hero Member
  • *****
  • Posts: 16363
  • Censorship about opinions does not belong here.
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #21 on: June 19, 2016, 09:47:11 am »
Google on whoislocking...

Also note that from windows 7 and definitely windows 10 it is no longer possible to compile to the root of the disk that contains the OS under windows. So normally that would be the C: drive and you can not longer compile to C:\ as user.
If you are trying that, try compiling to a subdirectory. That will normally work. Like c:\mypascalexecutables\myexe.exe
« Last Edit: June 19, 2016, 09:50:21 am by Thaddy »
There is nothing wrong with being blunt. At a minimum it is also honest.

BubikolRamios

  • Sr. Member
  • ****
  • Posts: 329
Re: Error: Can't create object file ; Fatal: Can't create executable
« Reply #22 on: December 01, 2023, 12:53:39 pm »
Win7, antivirus thing I think (Avast, AVG). Test:kill lazarus,  try to delete executable, will not let you. Antivirus is somehow holding to it.
Restart OS and it will let you delete executable, probably no need to delete it at this point, compile will work.
lazarus 3.2-fpc-3.2.2-win32/win64

 

TinyPortal © 2005-2018