Lazarus

Free Pascal => Beginners => Topic started by: ZEDHEADSDEAD on October 26, 2018, 11:50:30 pm

Title: Linking Trouble
Post by: ZEDHEADSDEAD on October 26, 2018, 11:50:30 pm
Hi all,
I am constructing a GUI controller for a project on a raspberry Pi 3 B+ running Raspian. I need access to the PXL library to send a constant frequency to a Driver circuit on a tesla coil. I ran a sample program that came with PXL called Blinky and it worked perfectly. However, when I use the PXL library in my own projects it always gave me this error "cannot find crtbegin.o" and "cannot find crtend.o". So I included the folder these files are located in. Now it won't compile and says it can't find the pxl.boards.types. Has anyone else had this issue?

Any help is GREATLY appreciated! :-[
Title: Re: Linking Trouble
Post by: Thaddy on October 27, 2018, 08:15:02 am
There are two issues here:
1) The crtbegin.o and crtend.o are in the GCC library directories and are not related to this error. This can usually be ignored but on my Raspberry Pi 3 I add:
 -Fl/usr/lib/gcc/arm-linux-gnueabihf/6.3.0 to fpc.cfg which is where they are located for my default GCC.
2) The pxl.boards.types is  a pascal unit that is not present or in the wrong place. http://asphyre.net/pxl/help/PXL.Boards.Types.html
So simply download the latest version of that library. Note that the sourcepath is case-sensitive: I have /home/pi/pxl/Source (with capital S)
also
- the basic opengles example crashes on fpc331 trunk (yes, resources are correct)
- the blink example works, but does not exit properly on key press..
Rest not tested. It seems Asphyre is not very stable, which surprises me a bit.
Title: Re: Linking Trouble
Post by: ZEDHEADSDEAD on October 28, 2018, 02:06:54 am
Seems reasonable. I'll tinker with it a bit and I'll let you know if i have any success.  Thank you muchly! :D
Title: Re: Linking Trouble
Post by: Thaddy on October 28, 2018, 09:02:25 am
you make just have to correct the /path/to/source/ to /path/to/Source/
As I said, although it compiles on the Raspberry Pi it doesn't seem to be tested sufficiently on armhf.
Title: Re: Linking Trouble
Post by: ZEDHEADSDEAD on October 30, 2018, 08:03:25 pm
FOUND IT! I was missing a path in the "unit files" section. Once I included the source it compiled.
TinyPortal © 2005-2018