On Tue, 26 Jan 2016 16:26:17 GMT, Sönke Ludwig wrote:
On Sat, 23 Jan 2016 22:05:39 GMT, Alv wrote:
Hello,
My D program was progressing nicely, until I �tested� it with release mode and got a linker error.
Severity Code Description Project File Line Suppression State
Error Error 42: Symbol Undefined D4vibe4core3log162T8logTraceVAyaa63433a5c445c646d64325c77696e646f77735c62696e5c2e2e5c2e2e5c74E19315AD33F01AC918E4DA11CD373D4 C:\Data\Dev\program\This function is:
void logTrace(string file = FILE, int line = LINE, S, T...)(S fmt, lazy T args) nothrow { log!(LogLevel.trace)(fmt, args); }When I include the log module in my own project AND remove the body of the function:
void logTrace(string file = FILE, int line = LINE, S, T...)(S fmt, lazy T args) nothrow { }it links fine.
My config:
Win7/64bit, Visual Studio / Visual D 0.3
DMD v2.069.2
vibe-d-0.7.26Any solution or suggestions what to investigate next?
This must be a DMD bug. If you can provide a test case, you should ideally file a bug report on http://issues.dlang.org.
One thing to try to work around this is to use the
--combined
switch when running DUB. Another is to enable the--allinst
switch of DMD, using a build type customization of the "release" configuration.
I have been having this frequently since DMD 2.067 I think. It then got fixed in 2.069 and it now almost never happens, except I think when I build with dub --root=/some/other/dir
. This might have just been coincidence.
In all cases, just dub build -f
has always fixed it for me.