-
Notifications
You must be signed in to change notification settings - Fork 33
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
Giving parameters meant for Optlink to other linkers caused errors #110
base: master
Are you sure you want to change the base?
Giving parameters meant for Optlink to other linkers caused errors #110
Conversation
@@ -41,8 +41,7 @@ configuration "windows-win32" { | |||
excludedSourceFiles \ | |||
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why shouldn't this flag be located here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.