www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Help: linking?

reply Martin <Martin_member pathlink.com> writes:
I am trying out the windows version of D compiler and cant get it to work.
For example I am trying to compile the samples\winsamp.d and it gives me:
******************************************************************
C:\dmd\samples\d>dmd winsamp.d
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
************************************************************************
I think this means that the linker didnt include the needed librarys. (I think
this is GDI32.LIB). So how do I tell the dmd to tell the linker to include the
GDI32.LIB ?
So how to I compile the winsamp.d?

Thank you!


Martin.
Jun 22 2004
next sibling parent Martin <Martin_member pathlink.com> writes:
Ok, I finally found out.
its : C:\dmd\samples\d>dmd winsamp -L+GDI32
where -L+GDI32 tells, that GDI32.lib should be included.


In article <cb9m5a$2jqk$1 digitaldaemon.com>, Martin says...
I am trying out the windows version of D compiler and cant get it to work.
For example I am trying to compile the samples\winsamp.d and it gives me:
******************************************************************
C:\dmd\samples\d>dmd winsamp.d
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
************************************************************************
I think this means that the linker didnt include the needed librarys. (I think
this is GDI32.LIB). So how do I tell the dmd to tell the linker to include the
GDI32.LIB ?
So how to I compile the winsamp.d?

Thank you!


Martin.

Martin
Jun 22 2004
prev sibling parent Andrew <Andrew_member pathlink.com> writes:
In article <cb9m5a$2jqk$1 digitaldaemon.com>, Martin says...
I am trying out the windows version of D compiler and cant get it to work.
For example I am trying to compile the samples\winsamp.d and it gives me:
******************************************************************
C:\dmd\samples\d>dmd winsamp.d
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
************************************************************************
I think this means that the linker didnt include the needed librarys. (I think
this is GDI32.LIB). So how do I tell the dmd to tell the linker to include the
GDI32.LIB ?
So how to I compile the winsamp.d?

Try this: dmd winsamp.d gdi32.lib
Thank you!


Martin.

Jun 22 2004