Compiling the hello world example fails (2)

Jacob Carlborg doob at
Mon Sep 9 23:36:05 PDT 2013

On 2013-09-09 20:15, Anton Alexeev wrote:
> Ubuntu 13.04, x86
> I've followed this instruction:
> Everything was ok, no errors.
> Then I've tried to compile hello world:
> $ dmd test.d -I/home/virtualbox/dwt/imp
> -J/home/virtualbox/dwt/org.eclipse.swt.gtk.linux.x86/res
> -L-L/home/virtualbox/dwt/lib -L-lorg.eclipse.swt.gtk.linux.x86 -L-ldwt-base
> /usr/bin/ld: cannot find -lorg.eclipse.swt.gtk.linux.x86
> /usr/bin/ld: cannot find -ldwt-base
> collect2: ошибка: выполнение ld завершилось с кодом возврата 1
> --- errorlevel 1
> With -L--verbose flag:
> There you can see that the linker tries to find
> liborg.eclipse.swt.gtk.linux.x86.a and not just
> org.eclipse.swt.gtk.linux.x86, so I've added "lib" to the file names

Ok, to avoid that you can I think you add a colon before the library 
name when linking:


Where <lib> is the library linking. The build script should be changed 
to append prepend "lib" to the library names.

> and got this:
> Any help?

Crap, it seems you need to manually link with the system libraries. 
They're located in this array:

Hope that solves it. Sorry for the inconvenience.

/Jacob Carlborg

More information about the Digitalmars-d-dwt mailing list