D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 12340 - /DELEXECUTABLE does not work
Summary: /DELEXECUTABLE does not work
Status: RESOLVED DUPLICATE of issue 5215
Alias: None
Product: D
Classification: Unclassified
Component: tools (show other issues)
Version: D2
Hardware: All Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-10 13:09 UTC by Andrej Mitrovic
Modified: 2020-04-09 08:31 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andrej Mitrovic 2014-03-10 13:09:22 UTC
Test-case:

-----
void main();
-----

$ dmd -run test.d
DMD v2.066 DEBUG
OPTLINK (R) for Win32  Release 8.00.13
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 23: No Stack
OPTLINK : Warning 134: No Start Address

---------------------------
Unsupported 16-Bit Application
---------------------------
The program or feature "\??\C:\dev\code\d_code\test.exe" cannot start or run due to incompatibity with 64-bit versions of Windows. Please contact the software vendor to ask if a 64-bit Windows compatible version is available.

Now let's try with /NOEXECUTABLE:
$ dmd -L/NOEXECUTABLE -run test.d

Same crash. The problem (as I see it) is that OPTLINK creates a warning when a start address is missing, rather than an error, so /NOEXECUTABLE has no effect.
Comment 1 Walter Bright 2014-03-10 13:44:55 UTC
Crash? That doesn't look like a crash.
Comment 2 Andrej Mitrovic 2014-03-10 13:47:19 UTC
(In reply to comment #1)
> Crash? That doesn't look like a crash.

Well it's a dialog box, isn't it? And it's completely uninformative to what the real problem is. The problem is Optlink generates an empty .exe file even if you use /DELEXECUTABLE.
Comment 3 Mathias LANG 2020-04-09 08:31:01 UTC
Marking as a duplicate of 5215 because the root cause is the same.
The issue itself has been moved to https://github.com/DigitalMars/optlink/issues/24

*** This issue has been marked as a duplicate of issue 5215 ***