How do you link with GtkD in VisualD?

Enjoys Math via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jan 26 14:04:55 PST 2016


I'm getting:

Severity	Code	Description	Project	File	Line
Error		Error 42: Symbol Undefined 
_D3gtk4Main12__ModuleInfoZ		C:\MyProjects\___LIGHTSHOWAPP\WindowsApp1\	
Error		Error 42: Symbol Undefined 
_D3gtk5Label5Label7__ClassZ		C:\MyProjects\___LIGHTSHOWAPP\WindowsApp1\	
Error		Error 42: Symbol Undefined _D3gtk4Main4Main4initFKAAyaZv 
(void gtk.Main.Main.init(ref 
immutable(char)[][]))		C:\MyProjects\___LIGHTSHOWAPP\WindowsApp1\	
Error		Error 42: Symbol Undefined 
_D3gtk5Label5Label6__ctorMFAyabZC3gtk5Label5Label 
(gtk.Label.Label gtk.Label.Label.__ctor(immutable(char)[], 
bool))		C:\MyProjects\___LIGHTSHOWAPP\WindowsApp1\	
Error		Error 42: Symbol Undefined 
_D3gtk10MainWindow10MainWindow7__ClassZ		C:\MyProjects\___LIGHTSHOWAPP\WindowsApp1\	
Error		Error 42: Symbol Undefined 
_D3gtk10MainWindow10MainWindow6__ctorMFAyaZC3gtk10MainWindow10MainWindow (gtk.MainWindow.MainWindow gtk.MainWindow.MainWindow.__ctor(immutable(char)[]))		C:\MyProjects\___LIGHTSHOWAPP\WindowsApp1\	
Error		Error 42: Symbol Undefined _D3gtk4Main4Main3runFZv (void 
gtk.Main.Main.run())		C:\MyProjects\___LIGHTSHOWAPP\WindowsApp1\	
Error		Error 42: Symbol Undefined 
_D3gtk5Label12__ModuleInfoZ		C:\MyProjects\___LIGHTSHOWAPP\WindowsApp1\	
Error		Error 42: Symbol Undefined 
_D3gtk10MainWindow12__ModuleInfoZ		C:\MyProjects\___LIGHTSHOWAPP\WindowsApp1\	

For:

import gtk.MainWindow;
import gtk.Label;
import gtk.Main;

void main(string[] args)
{
     Main.init(args);
     MainWindow win = new MainWindow("Hello World");
     win.setDefaultSize(200, 100);
     win.add(new Label("Hello World"));
     win.showAll();
     Main.run();
}

After setting Project Properties > Linker > General > Library 
Files: gtkd




More information about the Digitalmars-d-learn mailing list