Unable to link DWT build
Carl Sturtivant via Digitalmars-d-dwt
digitalmars-d-dwt at puremagic.com
Mon Nov 23 21:41:06 PST 2015
On Thursday, 19 November 2015 at 23:10:46 UTC, Paul D Anderson
> Downloaded DWT win32 and built it okay, but when I try to
> compile and link the "hello world" program I get link errors. I
> don't know enough about the win32 linker to know what the
> problem is.
> The most serious error is org.eclipse.swt.win32.win32.x86.lib
> 'Error 43: Not a Valid Library File'.
> I'm also having trouble specifying the lib and base
> directories. I get 'File not found lib.lib'. Ditto for base.lib.
> The link command line I'm using is
> LINK main, lib +"org.eclipse.swt.win32.win32.x86.lib"
> +"dwt-base.lib" /SUBSYSTEM:WINDOWS:4.0"
> Where have I gone wrong?
I just downloaded and built DWT following Jacob's instructions at
the bottom of this page.
I made a 64-bit build, and I had no problem linking via dmd,
which found the Microsoft linker despite the presence of the
32-bit linker, optlink, which is in the directory on my path
where dmd is. Optlink was named link.exe in my version, 2.069.1
which collides with the name of the Microsoft linker. But if I
attempt to link from the command line, optlink executes and fails
on 64-bit libs.
Your link command looks similar to that in the windows 32-bit
command on the web page above. So you are attempting to run the
32-bit linker, optlink. I'm assuming this means you attempted a
32-bit build of DWT as on that page, before attempting to compile
HelloWorld and link separately. Could you post your exact
commands to build DWT, to compile HelloWorld and to link
HelloWorld and the entire linker error message?
More information about the Digitalmars-d-dwt