www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Error on link

reply stonecobra <scott stonecobra.com> writes:
Using DMD 0.97:

I have the following code in interface.d:

interface Map {
   bool equals(Object o);
   int size();
}

abstract class AbstractMap : Map {
   int size() { return 0;}
   abstract bool equals(Object o);
}

abstract class HashMap : AbstractMap {
   bool equals(Object o) { return true; }
}

and I get the following:

C:\usr\local\src\d>dmd interface.d
c:\usr\local\dmd\bin\..\..\dm\bin\link.exe interface,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

OPTLINK : Warning 23: No Stack
interface.obj(interface)
  Error 42: Symbol Undefined _D9invariant12_d_invariantFC6ObjectZv
interface.obj(interface)
  Error 42: Symbol Undefined _D6object6Object8opEqualsFC6ObjectZi
interface.obj(interface)
  Error 42: Symbol Undefined _D6object6Object5opCmpFC6ObjectZi
interface.obj(interface)
  Error 42: Symbol Undefined _D6object6Object6toHashFZk
interface.obj(interface)
  Error 42: Symbol Undefined _D6object6Object8toStringFZAa
interface.obj(interface)
  Error 42: Symbol Undefined _D6object6Object5printFZv
interface.obj(interface)
  Error 42: Symbol Undefined __vtbl_9ClassInfo
interface.obj(interface)
  Error 42: Symbol Undefined __Class_6Object
OPTLINK : Warning 134: No Start Address
--- errorlevel 8


Thanks,
Scott Sanders
Jul 29 2004
parent reply Ben Hinkle <bhinkle4 juno.com> writes:
stonecobra wrote:

 Using DMD 0.97:
 
 I have the following code in interface.d:
 
 interface Map {
    bool equals(Object o);
    int size();
 }
 
 abstract class AbstractMap : Map {
    int size() { return 0;}
    abstract bool equals(Object o);
 }
 
 abstract class HashMap : AbstractMap {
    bool equals(Object o) { return true; }
 }
 
 and I get the following:
 
 C:\usr\local\src\d>dmd interface.d
 c:\usr\local\dmd\bin\..\..\dm\bin\link.exe
 interface,,,user32+kernel32/noi;
 OPTLINK (R) for Win32  Release 7.50B1
 Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
 
 OPTLINK : Warning 23: No Stack
 interface.obj(interface)
   Error 42: Symbol Undefined _D9invariant12_d_invariantFC6ObjectZv
 interface.obj(interface)
   Error 42: Symbol Undefined _D6object6Object8opEqualsFC6ObjectZi
 interface.obj(interface)
   Error 42: Symbol Undefined _D6object6Object5opCmpFC6ObjectZi
 interface.obj(interface)
   Error 42: Symbol Undefined _D6object6Object6toHashFZk
 interface.obj(interface)
   Error 42: Symbol Undefined _D6object6Object8toStringFZAa
 interface.obj(interface)
   Error 42: Symbol Undefined _D6object6Object5printFZv
 interface.obj(interface)
   Error 42: Symbol Undefined __vtbl_9ClassInfo
 interface.obj(interface)
   Error 42: Symbol Undefined __Class_6Object
 OPTLINK : Warning 134: No Start Address
 --- errorlevel 8
 
 
 Thanks,
 Scott Sanders

try adding a main. something like int main(){return 0;} either that or compile with the -c flag.
Jul 29 2004
parent stonecobra <scott stonecobra.com> writes:
Ben Hinkle wrote:
 
 
 try adding a main. something like
  int main(){return 0;}
 either that or compile with the -c flag.

Thanks Ben. Scott
Jul 29 2004