digitalmars.D.learn - DMD: How to compile executable without producing .obj file?
- BoQsc (12/12) Nov 05 2023 When you compile using `dmd` compiler you will often get `.exe`
- Kagamin (4/4) Nov 09 2023 The .exe is produced by the linker, which works with files: it
- Inkrementator (4/7) Nov 09 2023 On linux, gdc automatically cleans up object files by default.
- novice2 (3/3) Nov 12 2023 on windpows you can hide (move .obj away from sources dir) by add
When you compile using `dmd` compiler you will often get `.exe` and `.obj` file. I would like to only produce `.exe` file: ``` dmd -release -Ldatatypes.lib example.d ``` I tried dmd option: ``` -o- do not write object file ``` But it also prevents production of `.exe` file. Essentially producing nothing as a result.
Nov 05 2023
The .exe is produced by the linker, which works with files: it takes one or more .obj files with program code and links them into and .exe file. I heard ldc has builtin linker or something like that, so hypothetically might be able to link on the fly.
Nov 09 2023
On Sunday, 5 November 2023 at 18:58:48 UTC, BoQsc wrote:When you compile using `dmd` compiler you will often get `.exe` and `.obj` file. I would like to only produce `.exe` file:On linux, gdc automatically cleans up object files by default. Passing it the -pipe option will prevent their creation in the first place. Maybe it will have the same behaviour on windows.
Nov 09 2023
on windpows you can hide (move .obj away from sources dir) by add to compile command -od="%TEMP%\dmd\myproject"
Nov 12 2023