Recent

Author Topic: help for geriatric  (Read 2119 times)

dalcymru

  • New Member
  • *
  • Posts: 19
help for geriatric
« on: February 28, 2021, 12:42:26 pm »
At 88 yrs old, I am lost and struggling, with too much short-term memory loss.  I have been using daily a database programme I wrote years ago but want to update it to remove a bug I discovered recently.  It will not compile. I have not been able to find why and am too thick to find out.
The compile help I have been able to find says:
C:\lazarus\fpc\3.2.0\bin\x86_64-win64\fpc.exe -MObjFPC -Scghi -O1 -g-h -Xs -WG -l -vewnhibq -FiD:\dalData\lib\x86_64-win64 -FuC:\lazarus\lcl\units\x86_64-win64\win32 -FuC:\lazarus\lcl\units\x86_64-win64 -FuC:\lazarus\components\lazutils\lib\x86_64-win64 -FuC:\lazarus\packager\units\x86_64-win64 -FuD:\dalData\ -FUD:\dalData\lib\x86_64-win64\ -FED:\dalData\ -oD:\dalData\Dataproject.exe -dLCL -dLCLwin32 Dataproject.lpr

Parsers: make, FPC

ProcessID:
13024

ExitCode:
1
ExitStatus:
1

Error: Exit code 1

:end of copy of compile report.  I have no idea what exit code 1 means or where to find it but would like to find out if anyone can kindly point me to where I can preferably read for myself where I have gone wrong, this will bring relief.  Thanks in anticipation.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: help for geriatric
« Reply #1 on: February 28, 2021, 12:48:35 pm »
According to https://freepascal.org/docs-html/user/userap4.html the exit code denotes an invalid function number, i.e. the application tried to invoke an invalid operating system call. Did you change the OS or its version in the meanwhile? It might be that your program uses deprecated functionality.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: help for geriatric
« Reply #2 on: February 28, 2021, 05:43:36 pm »
I am guessing you installed a new Lazarus version. Is it "Run as Administrator" problem?
You had solved it before:
https://forum.lazarus.freepascal.org/index.php/topic,29254.0.html

dalcymru

  • New Member
  • *
  • Posts: 19
Re: help for geriatric
« Reply #3 on: March 04, 2021, 06:46:34 pm »
Thanks to both.  When the trees in the forest are too close together to let any light in at all, maybe the only course is to try to leave the woods to foresters and get out. 

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: help for geriatric
« Reply #4 on: March 11, 2021, 02:55:03 pm »
When the trees in the forest are too close together to let any light in at all, maybe the only course is to try to leave the woods to foresters and get out.

Suggestion: try something like a light refactoring, i.e. use more semantics in your variable and method names.
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

ccrause

  • Hero Member
  • *****
  • Posts: 845
Re: help for geriatric
« Reply #5 on: March 11, 2021, 07:27:00 pm »
The output you showed doesn't list the compiler error message.

If you compile from inside Lazarus, copy the compiler output from the Messages view.  To make sure you copy everything right-click on a message, select Copy, then Copy All/Original Messages to Clipboard. Paste the copied information into this thread, if it is too large then paste it in a file and attach the file to this thread.

Josh

  • Hero Member
  • *****
  • Posts: 1271
Re: help for geriatric
« Reply #6 on: March 11, 2021, 10:01:37 pm »
Hi
 
Quote
I have been using daily a database programme I wrote years ago
Suggests that you were previously using 32bit version of Lazarus, up until recently 32bit was the default download, now its 64bit.

If your database app is using sql, postgres etc, you possibly could be having issues with bitness, ie you have now compiled your program for 64bit
Quote
C:\lazarus\fpc\3.2.0\bin\x86_64-win64\fpc.exe
and your database dll are for 32bit.

If this is the case you can install the cross compiler for 64bit lazarus, you will need to set your cpu type to i386 for your project, in project options.
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%202.0.12/
or
Install the 32bit version
https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%202.0.12/lazarus-2.0.12-fpc-3.2.0-win32.exe/download
or
Download the 64bit versions of any database dll you are using

Just my initial thoughts
 

The best way to get accurate information on the forum is to post something wrong and wait for corrections.

 

TinyPortal © 2005-2018