Last update April 17, 2012

How To /
Opt Link

(redirection from How To / optilink)


Some tips for working with OPTLINK

The Digital Mars linker ( OPTLINK) was designed to be compatible with Microsoft's linker, and consequently has inherited an awkward command-line interface. Adding library search paths is a major pain.

To make life a bit easier, create the file "optlinks.cfg" in C:\dm\bin. The file should contain only the line

 /scanlib
This makes OPTLINK look at the environment variable "LIB".

Next, edit the file c:\dmd\bin\sc.ini and change the line containing LIB to something like

 LIB="%@P%\..\lib";\dm\lib;"%@P%\..\3rdparty\lib"
This makes link search also in the directory
 C:\dmd\3rdparty\lib
You may need to change the paths to your requirements.

See also http://prowiki.org/wiki4d/wiki.cgi?D__Tutorial/CompilingLinkingD


FrontPage | News | TestPage | MessageBoard | Search | Contributors | Folders | Index | Help | Preferences | Edit

Edit text of this page (date of last change: April 17, 2012 13:45 (diff))