[lazarus] Problems linking Lazarus

Hongli Lai hongli at telekabel.nl
Wed Apr 12 12:17:10 EDT 2000


When I try to compile lazarus, everything went fine.
All units compiles without problems.
But while fpc is linking Lazarus, I get this error message:

Linking ./lazarus
/ext2disk/opt/fpc/rtl/linux/cprt0.o: In function `_start':
/ext2disk/opt/fpc/rtl/linux/cprt0.o(.text+0x28): undefined reference to `__libc_init'
/ext2disk/opt/fpc/rtl/linux/cprt0.o(.text+0x35): undefined reference to `__setfpucw'
Warning: Error while linking
Closing script ./ppas.sh
42385 Lines compiled, 67.0 sec

(I have the sources installed in /opt/fpc, because /opt/fpc is a symbolic link
to /ext2disk/opt/fpc)

I also encounter this problem when I add unit Gtk to the uses section in a
program.
This small program for example will not be linked:

program test;
uses Gtk;
begin
end.

When I do a ppc386 test.pp, I get this error message:
/usr/lib/fpc-0.99.14/rtl/linux/cprt0.o: In function `_start':
/usr/lib/fpc-0.99.14/rtl/linux/cprt0.o(.text+0x28): undefined reference to `__libc_init'
/usr/lib/fpc-0.99.14/rtl/linux/cprt0.o(.text+0x35): undefined reference to `__setfpucw'

I'm sure this isn't a glibc problem, because I have a RedHat 6.1 system (with
glibc 6.1).
I have GTK+ 1.2.6 and Gnome installed.
All C programs that uses GTK+ compiles fine.

However, I discovered this isn't a Free Pascal's GTK+ library error.
When I try to compile this code:

program test;
Function puts(const s: PChar): Integer; cdecl; external 'c';
begin
  puts('Hello World!');
end.

I get the same error.

Can anybody help me?






More information about the Lazarus mailing list