Page 1 of 1

Executable damaged or incomplete

Posted: Sat Feb 12, 2022 6:50 pm
by WilliamL
I've spent a few hours trying to get a program to compile and am stymied. I get the same result in 5.73.

It runs fine in the IDE but when I compile it I get and app with a line thru it and the message.

Code: Select all

You can't open the application "RandomPicts.app" because it may be damaged or incomplete.
I've taken code out and it appears to compile once then not again.

Fortunately my other apps still compile.

I've never seen this before.

Re: Executable damaged or incomplete

Posted: Sat Feb 12, 2022 8:05 pm
by mk-soft
Without code, no one can say much.
Maybe there is a debug for a function or libraries are missing.

Re: Executable damaged or incomplete

Posted: Sat Feb 12, 2022 8:55 pm
by WilliamL
Yes, I was thinking a library was missing like the ExamineDesktops, or ExamineDirectories, or InitMovie, or image decoder, or timer function but I've used all of them before and never had a problem. It's just so odd that it runs fine but won't compile and the message seems to be saying that something wasn't added when it was compiled.

I know there isn't anything you can do from there and I will just have to go back to taking out code until it compiles and go from there.

Thanks for the reply.

I would rather it was my mistake than there was a problem with PureBasic. :)

Re: Executable damaged or incomplete

Posted: Sun Feb 13, 2022 4:17 am
by WilliamL
ok, I think I've solved the problem.

I started a new program and copied the code from the file that didn't compile to the new (blank) program. I am completely guessing, but, from reading the error message, that some libraries (?) weren't added to the compiled version. I do not know how pb keeps track of the libraries (?) it includes in the compiled version but I am guessing that the original file was somehow corrupt. The new version was 'clean' and worked fine.