Can't call the linker, switching to external linking
Original Reporter info from Mantis: mapopa
-
Reporter name:
Original Reporter info from Mantis: mapopa
- Reporter name:
Description:
When i try to create and udf library seems that the compiler switches to external linker
and doens't finishes (tested also with 2.2.0 from ubuntu hardy and that works finishes the linking stage)
fpc test.dpr
Free Pascal Compiler version 2.2.2 [2008/08/20] for x86_64
Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling test.dpr
Linking libtest.so
test.dpr(10) Error: Can't call the linker, switching to external linking
test.dpr(10) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)
fpc -a -s test.dpr
./ppas.sh
Assembling test
Linking libtest.so
Segmentation fault
An error occurred while linking libtest.so
Additional information:
library test;
{$MODE DELPHI}
uses funcs in 'funcs.pas';
exports Modulo;
begin
end.
cat funcs.pas
unit funcs;
{$IFDEF FPC}
{$MODE DELPHI}
{$ENDIF}
interface
uses Types;
function Modulo(var i, j: Integer): Integer; cdecl;
implementation
function Modulo(var i, j: Integer): Integer; cdecl;
begin
if (j = 0) then
Result := -1
else
Result := i mod j;
end;
end.
Mantis conversion info:
- Mantis ID: 12801
- Version: 2.2.2