Bug 13984 – Mangling of /ENTRY depends on DLL imports

Status
RESOLVED
Resolution
MOVED
Severity
normal
Priority
P1
Component
tools
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2015-01-15T12:59:20Z
Last change time
2020-04-09T08:35:01Z
Keywords
link-failure, mangling
Assigned to
No Owner
Creator
Vladimir Panteleev

Comments

Comment #0 by dlang-bugzilla — 2015-01-15T12:59:20Z
///////////// test.d //////////// extern(System) uint GetVersion(); void main() { // GetVersion(); } ///////////////////////////////// This program compiles and links fine with the command: dmd -L/ENTRY:_mainCRTStartup test.d However, if you uncomment the GetVersion line, linking breaks: OPTLINK (R) for Win32 Release 8.00.15 Copyright (C) Digital Mars 1989-2013 All rights reserved. http://www.digitalmars.com/ctg/optlink.html OPTLINK : Error 180: No Match Found for Export/ENTRY - : _mainCRTStartup --- errorlevel 1 To fix linking, the leading underscore needs to be removed from the command line: dmd -L/ENTRY:mainCRTStartup test.d
Comment #1 by pro.mathias.lang — 2020-04-09T08:35:01Z
Moved to OPTLINK Github repository: https://github.com/DigitalMars/optlink/issues/29