Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-01

compile/linker aborts

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

This problem must be very basic, but the solution alludes me. I am writing a much larger program, but I have distilled the problem down to the following:

OS: xp professional.
Freepascal: 2.2.2
Using the IDE & FPC

Situation: a unit file: compiles ok.
{*************************************************************************
**************}
{============================================================}
unit dummy__0;
interface
{=============================================================}
type
  dummy_ot = object
    a : byte;
    constructor init;
    procedure   something;
    destructor  done;
  end;
{============================================================}
implementation
{============================================================}
constructor dummy_ot.init;
begin
  a:=0;
end;
{-------------------------------------------------------------------------
}
procedure   dummy_ot.something;
begin
  a:=5;
end;
{-------------------------------------------------------------------------
}
destructor  dummy_ot.done;
begin
  a:=10;
end;
{==========================================================}
end. {unit}
{*************************************************************************
**************}

Situation: A Main program; aborts @ compilation:
{************************************************************************* **************}
program dummy_tst;
uses dummy__0;
{var
dummy : dummy_ot;}
{gives the same error; with it or without the var}

begin
{dummy.init; }
{gives the same error; with it or without the var} end.
{************************************************************************* **************}

The errors are:

ide: dummy__0.pas(9,1) Error: Error while linking.
fpc: Linking T:\dummy__0.exe
	dummy__0.pas(9,1) Error: Undefined symbol: DEBUGINFO_DUMMY__0
	dummy__0.pas(9,1) Error: Undefined symbol: DEBUGSTART_DUMMY__0
	dummy__0.pas(9,1) Error: Undefined symbol: DEBUGEND_DUMMY__0
	dummy__0.pas(9,1) Error: Undefined symbol:
THREADVARLIST_DUMMY__0
	dummy__0.pas(9,1) Error: Undefined symbol:
VMT_DUMMY__0_DUMMY_OT
	dummy__0.pas(9,1) Fatal: There were 5 errors compiling module, stopping
	Fatal: Compilation aborted

No other relevent info is given.

I do not understand these references to : Undefined symbol(s) I have not dealt with the internals of Freepascal, but I guess I am about to learn.

Regards
BobC