On Thu, 21 Feb 2019 20:50:41 +0100, Bo Berglund via lazarus
<lazarus@lists.lazarus-ide.org> wrote:

>project1.lpr(23,0) Warning: "crtbegin.o" not found, this will probably
>cause a linking failure
>project1.lpr(23,0) Warning: "crtend.o" not found, this will probably
>cause a linking failure
>(I have seen this crtbegin-crtend warning before, but have forgotten
>how to fix it, it is caused by something inside fpc.conf, I believe.)
>

I found a solution to this:
nano ~/.fpc.cnf

A few pages down there is a section like this:

# searchpath for libraries
#-Fl/home/pi/lib/fpc/$fpcversion/lib
#-Fl/lib;/usr/lib
-Fl/home/pi/lib/fpc/$fpcversion/lib/$FPCTARGET

Here I added this after the above line:
#Added to get rid of crtbegin.o and crtend.o warnings when compiling
in Lazarus
-Fl/usr/lib/gcc/arm-linux-gnueabihf/6/

The path was found by doing a search:

$ sudo find / -name crtend.o
find: ‘/proc/761/task/761/net’: Invalid argument
find: ‘/proc/761/net’: Invalid argument
/usr/lib/gcc/arm-linux-gnueabihf/6/crtend.o

After  this was added I compiled the project again and now these
warnings were gone.


-- 
Bo Berglund
Developer in Sweden

-- 
_______________________________________________
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to