Forum > Beginners
Unable to build simple program (files not found)
(1/1)
WoodLark:
I am completely new to Pascal although experienced in Visual Basic and PHP.
I want to learn Pascal, and I want to be able to build 32 bit linux programs
on my 64 bit linux machine (running Linux Mint 17.1 xfce).
I tried setting up for cross-compiling, but had zero success, so I went a
different route; I installed Linux Mint 17.3 32-bit in a Virtualbox and
installed 32-bit Free Pascal and Laxzarus on that.
I tried building a fairly simple program. It compiled, but gave me messages that crti.o
and crtn.o could not be found and would probably cause linking errors.
I looked on the file system for the virtual machine, and found these
files in /usr/lib/i386-linux-gnu.
/etc/fpc.cfg tells the compiler to look in /usr/lib/i386-linux-gnu/4.8
(which does not exist) for gcclib files so I changed the line:
-FI/usr/lib/i386-linux-gnu/4.8 to:
-FI/usr/lib/i386-linux-gnu
I restarted Lazarus and again tried to build the program. This time I got
warnings that it could not find crti.o, crtn.o, crtbegin.o, and crtend.o.
I assume I am doing something wrong, and would appreciate any guidance in
the right direction.
EDIT:
I found that I made in error in my original post.
fpc.cfg originally pointed to /usr/lib/gcc/i686-linux-gnu/4.8 which does indeed exist. However, crti.o and crtn.o are located in /usr/lib/i386-linux-gnu (note absence of gcc and i386 instead of i686). I am going to try creating symlinks to see if that solves the problem.
EDIT 2: I created symlinks in /usr/lib/gcc/i686-linu-gnu/4.8 to crti.o and crtn.o. That solved the problem.
Navigation
[0] Message Index