Difference between revisions of "OPTLINK"
(Initial version) |
|||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | OPTLINK is the Digital Mars linker. It is used by D on Windows to link 32-bit OMF files. | ||
+ | |||
+ | [http://www.digitalmars.com/ctg/optlink.html Official website] | ||
+ | |||
+ | == Building == | ||
+ | |||
Here is how to build OPTLINK from sources yourself. | Here is how to build OPTLINK from sources yourself. | ||
− | ==Requirements== | + | === Requirements === |
* Microsoft Visual C/C++ | * Microsoft Visual C/C++ | ||
* [http://digitalmars.com/ Digital Mars C/C++ (DMC)] | * [http://digitalmars.com/ Digital Mars C/C++ (DMC)] | ||
Line 7: | Line 13: | ||
* [http://www2.robpol86.com/guides/ImageCFG/ ImageCFG] | * [http://www2.robpol86.com/guides/ImageCFG/ ImageCFG] | ||
− | ==Steps== | + | === Steps === |
1. Clone the [https://github.com/DigitalMars/optlink OPTLINK sources from GitHub]: | 1. Clone the [https://github.com/DigitalMars/optlink OPTLINK sources from GitHub]: | ||
<syntaxhighlight lang=dos>git clone https://github.com/DigitalMars/optlink.git | <syntaxhighlight lang=dos>git clone https://github.com/DigitalMars/optlink.git | ||
Line 19: | Line 25: | ||
− | 3. Put ImageCFG on your PATH: | + | 3. Put ImageCFG and the DM bin directory on your PATH: |
− | <syntaxhighlight lang=dos>set PATH=[path to ImageCFG];%PATH%</syntaxhighlight> | + | <syntaxhighlight lang=dos>set PATH=[path to ImageCFG];%PATH%;[path to dmc.exe]</syntaxhighlight> |
Line 34: | Line 40: | ||
6. Ensure OPTLINK was built successfully: | 6. Ensure OPTLINK was built successfully: | ||
<syntaxhighlight lang=dos>os2link\objnt\link.exe /?</syntaxhighlight> | <syntaxhighlight lang=dos>os2link\objnt\link.exe /?</syntaxhighlight> | ||
+ | |||
+ | |||
+ | [[Category:DMD Compiler]] |
Latest revision as of 22:26, 13 May 2015
OPTLINK is the Digital Mars linker. It is used by D on Windows to link 32-bit OMF files.
Building
Here is how to build OPTLINK from sources yourself.
Requirements
- Microsoft Visual C/C++
- Digital Mars C/C++ (DMC)
- Git
- ImageCFG
Steps
1. Clone the OPTLINK sources from GitHub:
git clone https://github.com/DigitalMars/optlink.git
cd optlink
2. Put Microsoft's development tools on your PATH:
"[path to Microsoft Visual C/C++]\VC\bin\vcvars32.bat"
Example:
"C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
3. Put ImageCFG and the DM bin directory on your PATH:
set PATH=[path to ImageCFG];%PATH%;[path to dmc.exe]
4. Ensure everything works:
nmake /?
imagecfg
5. Build OPTLINK. Note that [path to Digital Mars tools] should be the directory which contains "bin/dmc.exe", not the bin directory itself:
build_optlink.bat DM=[path to Digital Mars tools]
6. Ensure OPTLINK was built successfully:
os2link\objnt\link.exe /?