buggins / dlangui

Cross Platform GUI for D programming language
Boost Software License 1.0
816 stars 122 forks source link

Failing to link on newer DMD/LDC versions? #567

Closed TheGag96 closed 2 years ago

TheGag96 commented 6 years ago

I updated my DMD and LDC to a new version recently, and although other projects have compiled, I'm getting this error. I'm on Windows 8.1 x64, DMD 2.079.1, LDC 1.8.0, Visual Studio 2017.

Performing "debug" build using C:\D\ldc\bin\ldc2.exe for x86_64.
derelict-util 2.0.6: target for configuration "library" is up to date.
derelict-ft 1.1.3: target for configuration "library" is up to date.
derelict-gl3 1.0.24: target for configuration "library" is up to date.
derelict-sdl2 2.0.2: target for configuration "library" is up to date.
dlangui 0.9.177: target for configuration "default" is up to date.
sfcgen ~master: building configuration "application"...
C:\Users\Grayson\AppData\Roaming\dub\packages\dlangui-0.9.177\dlangui\src\dlangui\widgets\lists.d(1409,16): Deprecation: struct std.datetime.StopWatch is deprecated - Use std.datetime.stopwatch.StopWatch.
C:\Users\Grayson\AppData\Roaming\dub\packages\dlangui-0.9.177\dlangui\src\dlangui\widgets\lists.d(1409,16): Deprecation: struct std.datetime.StopWatch is deprecated - Use std.datetime.stopwatch.StopWatch.
C:\Users\Grayson\AppData\Roaming\dub\packages\dlangui-0.9.177\dlangui\src\dlangui\widgets\lists.d(1413,23): Deprecation: struct std.datetime.StopWatch is deprecated - Use std.datetime.stopwatch.StopWatch.
dlangui.lib(dlangui.core.files.obj) : error LNK2019: unresolved external symbol __imp_CLSID_ShellLink referenced in function _D7dlangui4core5files16getBookmarkPathsFNbZASQBrQBmQBk9RootEntry
dlangui.lib(dlangui.core.files.obj) : error LNK2019: unresolved external symbol __imp_IID_IShellLinkW referenced in function _D7dlangui4core5files16getBookmarkPathsFNbZASQBrQBmQBk9RootEntry
dlangui.lib(dlangui.core.files.obj) : error LNK2019: unresolved external symbol __imp_IID_IPersistFile referenced in function _D7dlangui4core5files16getBookmarkPathsFNbZASQBrQBmQBk9RootEntry
.dub\build\application-debug-windows-x86_64-ldc_2078-1DEAAA1240280175F6EAC153F91A87C7\sfcgen.exe : fatal error LNK1120: 3 unresolved externals
Error: D:\Program Files\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\link.exe failed with status: 1120
C:\D\ldc\bin\ldc2.exe failed with exit code 1120.
Superbelko commented 6 years ago

For DMD you will probably need to clean all object files and rebuild, seems like minor mangling change from 2.079. As for LDC, I haven't yet find the cause, my initial guess was that it needs uuid.lib, but that didn't work.

Edit: As a workaround you can add to your project json

"sourceFiles-windows-ldc": [ "PATH_TO_LDC/import/core/sys/windows/uuid.d"]

which means that LDC 1.8 phobos2.lib for some reason doesn't have these symbols, and is clearly a bug.

FreeSlave commented 6 years ago

Can't reproduce on dmd 2.080. Did a full rebuild help you?

triplejam commented 6 years ago

I can confirm this problem with ldc 1.7 on win 10 64 bit.

EDIT: I tried with ldc 1.9 setting --config=minimal and I got example1 to run fine.

buggins commented 6 years ago

Looks like fixed for me. Can we close this issue?

GrimMaple commented 2 years ago

I am going to close this issue as of now, because I added pipelines and everything. If something fails to compile, please open a new issue.