[fpc-pascal] A linking error when compiling with FPC 2.4.4

Luciano de Souza luchyanus at gmail.com
Mon Oct 31 11:27:13 CET 2011


Hi listers,

I have installed FPC 2.4.4 using the following package:
http://mirrors.iwi.me/lazarus/snapshots/fpc-2.4.4-1.i386.deb.tar
Having unpacked it in a folder, I did:
sudo dpkg -i *.deb
The instalation was seemingly successful since I could compile some 
sources. However, compiling the attached example, I got an error:
fpc macuco.pas > output
The output file has received the following content:
Free Pascal Compiler version 2.4.4-1 [2011/05/24] for i386
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Linux for i386
Compiling macuco.pas
Compiling macbase.pas
Linking macuco
macuco.pas(14,1) Error: Error while linking
macuco.pas(14,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppc386 returned an error exitcode (normal if you did not 
specify a source file to be compiled)

The executable was not generated. In its place, I found "link.res". The 
compilation was successful, but for a unknown reason, the linkage was 
not completed. I don't understand what the statements in link.res means 
indeed.
In spite of the output redirection, a  statement was writen in console 
in stead of the output file.

Cannot find -lsqlite3

I tried a reinstalation:

sudo apt-get purge fp-compiler
sudo apt-get autoremove
cd /home/luciano/fpc-2.4.4-1.i386/
sudo dpkg -I *deb

After it, the compiler shows the same behaviour and the described error 
continues. The compiler seems to be working correctly when I don't use 
"uses db, sqlite3ds'.
Does someone know what it is wrong?
I use FPC 2.4.4 without Lazarus and Ubuntu 10.10.

Luciano
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: link.res
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111031/118c5af7/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: macuco.pas
Type: text/x-pascal
Size: 181 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111031/118c5af7/attachment.pas>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: macbase.pas
Type: text/x-pascal
Size: 804 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111031/118c5af7/attachment-0001.pas>


More information about the fpc-pascal mailing list