www.digitalmars.com         C & C++   DMDScript  

D - Error building winsamp.d

reply "Luciano Coutinho Barcellos" <majnun ig.com.br> writes:
Hello all.

    I've downloaded the D compiler, saved it at C:\dmd and the C compiler at
C:\dm.
    Compilation of all samples was fine, except for winsamp.d, which give
the following error:

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

winsamp.obj(winsamp)
 Error 42: Symbol Undefined _SelectObject 8
winsamp.obj(winsamp)
 Error 42: Symbol Undefined _SetTextAlign 8
winsamp.obj(winsamp)
 Error 42: Symbol Undefined _TextOutA 20
winsamp.obj(winsamp)
 Error 42: Symbol Undefined _CreateFontA 56
--- errorlevel 4

    What is wrong? Thanks.

    Luciano
Nov 10 2003
next sibling parent "Vathix" <vathix dprogramming.com> writes:
link with gdi32.lib

"Luciano Coutinho Barcellos" <majnun ig.com.br> wrote in message
news:booula$1npj$1 digitaldaemon.com...
 Hello all.

     I've downloaded the D compiler, saved it at C:\dmd and the C compiler

 C:\dm.
     Compilation of all samples was fine, except for winsamp.d, which give
 the following error:

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

 winsamp.obj(winsamp)
  Error 42: Symbol Undefined _SelectObject 8
 winsamp.obj(winsamp)
  Error 42: Symbol Undefined _SetTextAlign 8
 winsamp.obj(winsamp)
  Error 42: Symbol Undefined _TextOutA 20
 winsamp.obj(winsamp)
  Error 42: Symbol Undefined _CreateFontA 56
 --- errorlevel 4

     What is wrong? Thanks.

     Luciano

Nov 10 2003
prev sibling parent Dario <Dario_member pathlink.com> writes:
Luciano Coutinho Barcellos:
C:\dmd\samples\d>\dmd\bin\dmd winsamp
C:\dmd\bin\..\..\dm\bin\link.exe winsamp,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

winsamp.obj(winsamp)
 Error 42: Symbol Undefined _SelectObject 8
winsamp.obj(winsamp)
 Error 42: Symbol Undefined _SetTextAlign 8
winsamp.obj(winsamp)
 Error 42: Symbol Undefined _TextOutA 20
winsamp.obj(winsamp)
 Error 42: Symbol Undefined _CreateFontA 56
--- errorlevel 4

    What is wrong? Thanks.

Type this: C:\dmd\samples\d>\dmd\bin\dmd winsamp \dm\lib\gdi32.lib (The undefined functions are contained in the windows DLL gdi32.dll. To let the linker know, you have to pass it the .lib file for that .dll.)
Nov 10 2003