| Thread overview | ||||||
|---|---|---|---|---|---|---|
|
May 17, 2012 Do not write object file? | ||||
|---|---|---|---|---|
| ||||
Every time I compile a D code, an .obj file is generated. Is there any to prevent that? I tried "dmd -o- hello.d". Indeed there's no obj file. And no executable, too. Maybe this is a bug? | ||||
May 17, 2012 Re: Do not write object file? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andre Tampubolon | The linker makes exe from obj. | |||
May 17, 2012 Re: Do not write object file? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Andre Tampubolon | On Thursday, 17 May 2012 at 10:16:38 UTC, Andre Tampubolon wrote:
> Every time I compile a D code, an .obj file is generated.
> Is there any to prevent that?
>
> I tried "dmd -o- hello.d". Indeed there's no obj file. And no
> executable, too.
>
> Maybe this is a bug?
If you don't want object files to be generated (actually they must be generated in order for linker to build exe) compile with rdmd (it will put object files in a temp directory so your project folder is kept clean):
rdmd --build-only (dmd parameter here) main.d
also rdmd will take care of your dependencies so you just have to pass it your "main" file.
| |||
May 17, 2012 Re: Do not write object file? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Aleksandar Ružičić | Actually what I mean is once the compilation is done, the object file will be automatically removed.
So I guess this is my misunderstanding of "dmd -o-". No problem, then.
On 5/17/2012 6:09 PM, "Aleksandar Ružičić" <aleksandar@ruzicic.info>" wrote:
> On Thursday, 17 May 2012 at 10:16:38 UTC, Andre Tampubolon wrote:
>> Every time I compile a D code, an .obj file is generated. Is there any to prevent that?
>>
>> I tried "dmd -o- hello.d". Indeed there's no obj file. And no executable, too.
>>
>> Maybe this is a bug?
>
> If you don't want object files to be generated (actually they must be
> generated in order for linker to build exe) compile with rdmd (it will
> put object files in a temp directory so your project folder is kept clean):
>
> rdmd --build-only (dmd parameter here) main.d
>
> also rdmd will take care of your dependencies so you just have to pass it your "main" file.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply