Lazarus
Programming => General => Topic started by: dalcymru 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.
-
According to https://freepascal.org/docs-html/user/userap4.html (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.
-
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 (https://forum.lazarus.freepascal.org/index.php/topic,29254.0.html)
-
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.
-
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.
-
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.
-
Hi
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 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