Giving parameters meant for Optlink to other linkers caused errors#110
Giving parameters meant for Optlink to other linkers caused errors#110torhus wants to merge 1 commit intod-widget-toolkit:masterfrom
Conversation
| "org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/mozilla/*" | ||
|
|
||
| lflags `+$DWT_PACKAGE_DIR\org.eclipse.swt.win32.win32.x86\lib\` platform="x86-dmd" | ||
| lflags `/exet:nt/su:console:4.0` platform="x86-dmd" |
There was a problem hiding this comment.
Why shouldn't this flag be located here?
There was a problem hiding this comment.
When I set lflags to "/subsystem:windows:4" platform="x86_omf" in my application's dub.sdl, DUB hands both of these flags to Optlink, which then fails. I'm not sure that the dub.sdl for a library should specify linker flags for the executable in any case.
My dub.sdl is here. This is the output of dub build -a=x86 -c=windows -v, just the last part:
Linking...
dmd -of.dub\build\windows-debug-windows-x86.x86_omf-dmd_v2.098.1-dirty-E19EE96DF69DD1F2F42225F25FAEFD6B\MonsterBrowser.exe .dub\build\windows-debug-windows-x86.x86_omf-dmd_v2.098.1-dirty-E19EE96DF69DD1F2F42225F25FAEFD6B\MonsterBrowser.obj C:\Users\Tor\AppData\Local\dub\packages\dwt-19f219e\dwt.dub\build\windows-win32-debug-windows-x86.x86_omf-dmd_v2.098.1-dirty-1834BE915F39DAC157FE4B93801A334D\dwt.lib C:\Users\Tor\AppData\Local\dub\packages\dwt-19f219e\dwt.dub\build\library-debug-windows-x86.x86_omf-dmd_v2.098.1-dirty-D97C1206C6747F5F1023630810528EC0\dwt_base.lib C:\Users\Tor\AppData\Local\dub\packages\undead-1.1.7\undead.dub\build\library-debug-windows-x86.x86_omf-dmd_v2.098.1-dirty-0DAFEBC2AD885CF5A0EC9F5909572A39\undead.lib advapi32.lib comctl32.lib comdlg32.lib gdi32.lib kernel32.lib msimg32.lib ole32.lib oleacc.lib oleaut32.lib opengl32.lib shell32.lib shlwapi.lib user32.lib usp10.lib olepro32.lib -L/rc:misc\mb.res -L/subsystem:windows:4 -L/exet:nt/su:console:4.0 -L+C:\Users\Tor\AppData\Local\dub\packages\dwt-19f219e\dwt\org.eclipse.swt.win32.win32.x86\lib\ -m32 -g
OPTLINK (R) for Win32 Release 8.00.17
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Error 9: Unknown Option
+"C:\Users\Tor\AppData\Local\dub\packages\undead-1.1.7\undead.dub\build\library-debug-windows-x86.x86_omf-dmd_v2.098.1-dirty-0DAFEBC2AD885CF5A0EC9F5909572A39\undead.lib"+"advapi32.lib"+"comctl32.lib"+"comdlg32.lib"+"gdi32.lib"+"kernel32.lib"+"msimg32.lib"+"ole32.lib"+"oleacc.lib"+"oleaut32.lib"+"opengl32.lib"+"shell32.lib"+"shlwapi.lib"+"user32.lib"+"usp10.lib"+"olepro32.lib"+phobos+user32+kernel32/co/noi/rc:misc\mb.res/subsystem:windows:4/exet:nt/su:console:4.0+C:\Users\Tor\AppData\Local\dub\packages\dwt-19f219e\dwt\org.eclipse.swt.win32.win32.x86\lib;^:4.0
Warning 2: File Not Found :4.0
Error: linker exited with status 1
FAIL .dub\build\windows-debug-windows-x86.x86_omf-dmd_v2.098.1-dirty-E19EE96DF69DD1F2F42225F25FAEFD6B\ MonsterBrowser executable
dmd failed with exit code 1.
Fixes #61.