D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19901 - importing export symbols causes link errors
Summary: importing export symbols causes link errors
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P1 regression
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2019-05-25 08:46 UTC by Rainer Schuetze
Modified: 2019-05-25 11:46 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Schuetze 2019-05-25 08:46:03 UTC
Building the mydll example in dmd\samples\mydll results in a link error:

>dmd -m32 -ofmydll.dll -L/IMPLIB mydll\mydll.d mydll\dll.d mydll\mydll.def
>dmd -m32 -ofdlltest.exe mydll\test.d mydll\mydll.di mydll.lib
OPTLINK (R) for Win32  Release 8.00.17
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
dlltest.obj(dlltest)
 Error 42: Symbol Undefined _D5mydll8dllprintFZv
Error: linker exited with status 1
Comment 1 Dlang Bot 2019-05-25 08:54:01 UTC
@rainers created dlang/dmd pull request #9885 "fix issue 19901 - importing export symbols causes link errors (Win32)" fixing this issue:

- fix issue 19901 - importing export symbols causes link errors (Win32)
  
  build and run the mydll example also for -m64 and -m32mscoff

https://github.com/dlang/dmd/pull/9885
Comment 2 Dlang Bot 2019-05-25 11:46:00 UTC
dlang/dmd pull request #9885 "fix issue 19901 - importing export symbols causes link errors (Win32)" was merged into stable:

- d16d4c5ecf92fb52eee28cb8ab2c4d1b9f1544b0 by Rainer Schuetze:
  fix issue 19901 - importing export symbols causes link errors (Win32)
  
  build and run the mydll example also for -m64 and -m32mscoff

https://github.com/dlang/dmd/pull/9885