Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mangling of /ENTRY depends on DLL imports #29

Open
Geod24 opened this issue Apr 9, 2020 · 0 comments
Open

Mangling of /ENTRY depends on DLL imports #29

Geod24 opened this issue Apr 9, 2020 · 0 comments

Comments

@Geod24
Copy link

Geod24 commented Apr 9, 2020

Transferred from: https://issues.dlang.org/show_bug.cgi?id=13984

User @CyberShadow reported (2015-01-15 13:59:20 CET):

///////////// 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant