[fpc-pascal] Re: Linking issue in Ubuntu 9.04 (32 bit)

Alan Krause alank at shermanloan.com
Tue Jul 7 18:21:46 CEST 2009


Just a quick update on this issue. I finally decided to submit a bug report
via Ubuntu's Launchpad, as I didn't see any other similar bugs in their
database. ( Bug report is here: https://bugs.launchpad.net/bugs/392197 )

It looks as if the issue has now been resolved and the fix is available for
the next release (9.10 - Karmic Koala). However, I was able to download the
appropriate .DEB file for my architecture and install it on a 9.04 box, and
it does appear to work as advertised.

Alan


On Fri, Apr 24, 2009 at 1:39 PM, Alan Krause <alank at shermanloan.com> wrote:

> I've installed ubuntu 9.04 in a VM to test it out, and have installed fpc
> 2.2.4. It is always good to look before you leap, right?
>
> Anyhow, I am trying to compile an existing project that works fine under
> Ubuntu 8.04. I can get all of the unit to compile, but when it comes time to
> link them together into a shared library, I get the following:
>
> Linking libproj.so
> Error: Can't call the linker, switching to external linking
> Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> Error: /usr/local/bin/ppc386 returned an error exitcode (normal if you did
> not specify a source file to be compiled)
>
> Here is the source code for the sample project:
>
> library project1;
>
> uses
>  Classes;
>
> function dRound(iDec: integer; dRate: double): double;
> const
>  TenToPower: Array[0..9] of integer = (1, 10, 100, 1000, 10000, 100000,
>                                        1000000, 10000000, 100000000,
> 1000000000);
> var
>  dInc : double;
> begin
>  if iDec > 0 then begin
>     dInc := 0.5000001;
>     result := trunc (dRate * (TenToPower [iDec]) + dInc) /
>        TenToPower [iDec];
>  end else begin
>     result := dRate;
>  end ;
> end;
>
> function one : double; cdecl;
> begin
>  Result := dRound( 2, 0.529 ) ;
> end;
>
> begin
> end.
>
> And the command I use to compile it is:
> fpc -Sd -Cg -O3 proj.pas
>
> Anyone else having similar issues?
>
> Alan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20090707/72c3bbb6/attachment.html>


More information about the fpc-pascal mailing list