Using GtK

Ferhat Kurtulmuş aferust at gmail.com
Mon Aug 23 20:58:25 UTC 2021


On Monday, 23 August 2021 at 20:21:13 UTC, Ruby The Roobster 
wrote:
> I have a very basic program that does ABSOLUTELY NOTHING.  Here 
> is the code:
> ```d
> import gtk.Main;
> import gtk.MainWindow;
> import gtk.Widget;
> void main()   {
> }
> ```
> I am using gdc version 10.3.0 on Ubuntu 20.04.  Assuming the 
> file name is test.d, here is my command line:
>
> gdc -I/usr/include/gtkd-3 -L-ldl -L-libgtkd-3 test.d
>
> It generates the following errors:
>
> /usr/bin/ld: /tmp/ccelqCb4.o:(.data.rel+0x10): undefined 
> reference to `_D3gtk10MainWindow12__ModuleInfoZ'
> /usr/bin/ld: /tmp/ccelqCb4.o:(.data.rel+0x18): undefined 
> reference to `_D3gtk4Main12__ModuleInfoZ'
> /usr/bin/ld: /tmp/ccelqCb4.o:(.data.rel+0x20): undefined 
> reference to `_D3gtk6Widget12__ModuleInfoZ'
> collect2: error: ld returned 1 exit status
>
> Why is this, and how can I fix it?  Thanks in advance.

I can only guess that module imports trigger module constructor 
including some code that requires c linkage (Gtk).


More information about the D.gnu mailing list