Skip to content
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

Change dub.sdl when x86_omf is established #61

Open
kntroh opened this issue Aug 29, 2020 · 2 comments · May be fixed by #110
Open

Change dub.sdl when x86_omf is established #61

kntroh opened this issue Aug 29, 2020 · 2 comments · May be fixed by #110

Comments

@kntroh
Copy link
Contributor

kntroh commented Aug 29, 2020

See also: #60

Currently, when we try to do an x86_mscoff build with dub on Windows, We get a link error.
The following flags is required when using OPTLINK, but it must not be specified when linking COFF.

lflags `+$DWT_PACKAGE_DIR\org.eclipse.swt.win32.win32.x86\lib\` platform="x86-dmd"
lflags `/exet:nt/su:console:4.0` platform="x86-dmd"

However, as of dmd 2.093.1, I don't think it's possible to set "specify a flag for x86 but not for x86_mscoff".
It is expected that x86_omf will be added to dub's configuration in the near future, so that we can specify the flags only if it is really needed.
After x86_omf is established, we need to make changes to dub.sdl as this:

lflags `+$DWT_PACKAGE_DIR\org.eclipse.swt.win32.win32.x86\lib\` platform="x86_omf"
lflags `/exet:nt/su:console:4.0` platform="x86_omf"
@torhus
Copy link

torhus commented Sep 16, 2022

x86_omf was added in DMD 2.094.0, maybe this can this be fixed now?

@torhus
Copy link

torhus commented Sep 22, 2022

Actually, I think that the second line should not be there at all. I have to comment it out to avoid linker errors when using Optlink, it conflicts with /subsystem:windows:4 in my project's dub.sdl. Does /exet:nt actually do anything? I have never used it.

But the subsystem version has to be set to at least 4 when using Optlink, as it defaults to something that's too old. Otherwise you get weird issues, like Table widgets not having headers. So it probably has to be set when building examples, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants