digitalmars.D.learn - GtkD nothing
- FoxyBrown (23/23) Jul 05 2017 import gtk.MainWindow;
- FoxyBrown (6/29) Jul 05 2017 Running it from the command line showed it wasn't finding the gtk
- FoxyBrown (3/10) Jul 05 2017 Copying over the share dir gets it to work but surely all this is
- FoxyBrown (4/15) Jul 05 2017 So, while the setup isn't smooth and not finding everything, do I
- FoxyBrown (350/350) Jul 05 2017 The module All in GtkD\generated\Gtkd\gtk will allow importing
- FoxyBrown (6/6) Jul 05 2017 Unfortunately, importing that module seems to throw an error for
- Marco Leise (7/16) Jul 06 2017 Sounds like there is no compiled version of gtk.All in the
import gtk.MainWindow; import gtk.Label; import gtk.Main; import std.stdio; pragma(lib, "C:\\DLang\\GtkD\\x86\\gtkd.lib"); 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(); getchar(); } Did all the steps, had to switch over from the 64-bit to the 32-bit dll of gtk+ to avoid errors(since i couldn't get gtkD to compile for 64-bit). The above code(copied from site) simply runs and exists, I added the getchar but it doesn't seem to be executed. a BP on the first line is never reached, no errors, nothing, to help diagnose the issues. Any ideas?
Jul 05 2017
On Thursday, 6 July 2017 at 00:51:40 UTC, FoxyBrown wrote:import gtk.MainWindow; import gtk.Label; import gtk.Main; import std.stdio; pragma(lib, "C:\\DLang\\GtkD\\x86\\gtkd.lib"); 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(); getchar(); } Did all the steps, had to switch over from the 64-bit to the 32-bit dll of gtk+ to avoid errors(since i couldn't get gtkD to compile for 64-bit). The above code(copied from site) simply runs and exists, I added the getchar but it doesn't seem to be executed. a BP on the first line is never reached, no errors, nothing, to help diagnose the issues. Any ideas?Running it from the command line showed it wasn't finding the gtk dll. The path variable is set up correctly. I copied the bin dir to the exe and it ran and worked except for missing icons. Why is gtkD not finding gtk+ even though it is clearly in the path and correct?
Jul 05 2017
On Thursday, 6 July 2017 at 01:03:11 UTC, FoxyBrown wrote:On Thursday, 6 July 2017 at 00:51:40 UTC, FoxyBrown wrote:Copying over the share dir gets it to work but surely all this is avoidable?[...]Running it from the command line showed it wasn't finding the gtk dll. The path variable is set up correctly. I copied the bin dir to the exe and it ran and worked except for missing icons. Why is gtkD not finding gtk+ even though it is clearly in the path and correct?
Jul 05 2017
On Thursday, 6 July 2017 at 01:06:38 UTC, FoxyBrown wrote:On Thursday, 6 July 2017 at 01:03:11 UTC, FoxyBrown wrote:So, while the setup isn't smooth and not finding everything, do I really have to import every ui element or can I just import the entire gtk?On Thursday, 6 July 2017 at 00:51:40 UTC, FoxyBrown wrote:Copying over the share dir gets it to work but surely all this is avoidable?[...]Running it from the command line showed it wasn't finding the gtk dll. The path variable is set up correctly. I copied the bin dir to the exe and it ran and worked except for missing icons. Why is gtkD not finding gtk+ even though it is clearly in the path and correct?
Jul 05 2017
The module All in GtkD\generated\Gtkd\gtk will allow importing everything, e.g. import gtk = gtk.All; gtk.MainWindow etc. All.d-------------- module gtk.All; public import gtk.AboutDialog; public import gtk.AccelGroup; public import gtk.AccelLabel; public import gtk.AccelMap; public import gtk.Accessible; public import gtk.Action; public import gtk.ActionableIF; public import gtk.ActionableT; public import gtk.ActionBar; public import gtk.ActionGroup; public import gtk.ActivatableIF; public import gtk.ActivatableT; public import gtk.Adjustment; public import gtk.Alignment; public import gtk.AppChooserButton; public import gtk.AppChooserDialog; public import gtk.AppChooserIF; public import gtk.AppChooserT; public import gtk.AppChooserWidget; public import gtk.Application; public import gtk.ApplicationWindow; public import gtk.Arrow; public import gtk.ArrowAccessible; public import gtk.AspectFrame; public import gtk.Assistant; public import gtk.Bin; public import gtk.BindingEntry; public import gtk.BindingSet; public import gtk.BooleanCellAccessible; public import gtk.Border; public import gtk.Box; public import gtk.BuildableIF; public import gtk.BuildableT; public import gtk.Builder; public import gtk.Button; public import gtk.ButtonAccessible; public import gtk.ButtonBox; public import gtk.Calendar; public import gtk.CellAccessible; public import gtk.CellAccessibleParentIF; public import gtk.CellAccessibleParentT; public import gtk.CellArea; public import gtk.CellAreaBox; public import gtk.CellAreaClass; public import gtk.CellAreaContext; public import gtk.CellEditable; public import gtk.CellEditableIF; public import gtk.CellEditableT; public import gtk.CellLayoutIF; public import gtk.CellLayoutT; public import gtk.CellRenderer; public import gtk.CellRendererAccel; public import gtk.CellRendererClass; public import gtk.CellRendererCombo; public import gtk.CellRendererPixbuf; public import gtk.CellRendererProgress; public import gtk.CellRendererSpin; public import gtk.CellRendererSpinner; public import gtk.CellRendererText; public import gtk.CellRendererToggle; public import gtk.CellView; public import gtk.CheckButton; public import gtk.CheckMenuItem; public import gtk.CheckMenuItemAccessible; public import gtk.Clipboard; public import gtk.ColorButton; public import gtk.ColorChooserDialog; public import gtk.ColorChooserIF; public import gtk.ColorChooserT; public import gtk.ColorChooserWidget; public import gtk.ColorSelection; public import gtk.ColorSelectionDialog; public import gtk.ComboBox; public import gtk.ComboBoxAccessible; public import gtk.ComboBoxText; public import gtk.Container; public import gtk.ContainerAccessible; public import gtk.ContainerCellAccessible; public import gtk.ContainerClass; public import gtk.CssProvider; public import gtk.CssSection; public import gtk.Dialog; public import gtk.DragAndDrop; public import gtk.DrawingArea; public import gtk.EditableIF; public import gtk.EditableT; public import gtk.Entry; public import gtk.EntryAccessible; public import gtk.EntryBuffer; public import gtk.EntryCompletion; public import gtk.EventBox; public import gtk.EventController; public import gtk.Expander; public import gtk.ExpanderAccessible; public import gtk.FileChooserButton; public import gtk.FileChooserDialog; public import gtk.FileChooserIF; public import gtk.FileChooserNative; public import gtk.FileChooserT; public import gtk.FileChooserWidget; public import gtk.FileFilter; public import gtk.Fixed; public import gtk.FlowBox; public import gtk.FlowBoxAccessible; public import gtk.FlowBoxChild; public import gtk.FlowBoxChildAccessible; public import gtk.FontButton; public import gtk.FontChooserDialog; public import gtk.FontChooserIF; public import gtk.FontChooserT; public import gtk.FontChooserWidget; public import gtk.FontSelection; public import gtk.FontSelectionDialog; public import gtk.Frame; public import gtk.FrameAccessible; public import gtk.Gesture; public import gtk.GestureDrag; public import gtk.GestureLongPress; public import gtk.GestureMultiPress; public import gtk.GesturePan; public import gtk.GestureRotate; public import gtk.GestureSingle; public import gtk.GestureSwipe; public import gtk.GestureZoom; public import gtk.GLArea; public import gtk.Gradient; public import gtk.Grid; public import gtk.HandleBox; public import gtk.HBox; public import gtk.HButtonBox; public import gtk.HeaderBar; public import gtk.HPaned; public import gtk.HScale; public import gtk.HScrollbar; public import gtk.HSeparator; public import gtk.HSV; public import gtk.IconFactory; public import gtk.IconInfo; public import gtk.IconSet; public import gtk.IconSize; public import gtk.IconSource; public import gtk.IconTheme; public import gtk.IconView; public import gtk.IconViewAccessible; public import gtk.Image; public import gtk.ImageAccessible; public import gtk.ImageCellAccessible; public import gtk.ImageMenuItem; public import gtk.IMContext; public import gtk.IMContextSimple; public import gtk.IMMulticontext; public import gtk.InfoBar; public import gtk.Invisible; public import gtk.Label; public import gtk.LabelAccessible; public import gtk.Layout; public import gtk.LevelBar; public import gtk.LevelBarAccessible; public import gtk.LinkButton; public import gtk.LinkButtonAccessible; public import gtk.ListBox; public import gtk.ListBoxAccessible; public import gtk.ListBoxRow; public import gtk.ListBoxRowAccessible; public import gtk.ListStore; public import gtk.LockButton; public import gtk.LockButtonAccessible; public import gtk.Main; public import gtk.MainWindow; public import gtk.Menu; public import gtk.MenuAccessible; public import gtk.MenuBar; public import gtk.MenuButton; public import gtk.MenuButtonAccessible; public import gtk.MenuItem; public import gtk.MenuItemAccessible; public import gtk.MenuShell; public import gtk.MenuShellAccessible; public import gtk.MenuToolButton; public import gtk.MessageDialog; public import gtk.Misc; public import gtk.ModelButton; public import gtk.MountOperation; public import gtk.NativeDialog; public import gtk.Notebook; public import gtk.NotebookAccessible; public import gtk.NotebookPageAccessible; public import gtk.NumerableIcon; public import gtk.OffscreenWindow; public import gtk.OrientableIF; public import gtk.OrientableT; public import gtk.Overlay; public import gtk.PadController; public import gtk.PageSetup; public import gtk.Paned; public import gtk.PanedAccessible; public import gtk.PaperSize; public import gtk.PlacesSidebar; public import gtk.Plug; public import gtk.Popover; public import gtk.PopoverAccessible; public import gtk.PopoverMenu; public import gtk.PopupBox; public import gtk.PrintContext; public import gtk.PrintOperation; public import gtk.PrintOperationPreview; public import gtk.PrintOperationPreviewIF; public import gtk.PrintOperationPreviewT; public import gtk.PrintSettings; public import gtk.ProgressBar; public import gtk.ProgressBarAccessible; public import gtk.RadioAction; public import gtk.RadioButton; public import gtk.RadioButtonAccessible; public import gtk.RadioMenuItem; public import gtk.RadioMenuItemAccessible; public import gtk.RadioToolButton; public import gtk.Range; public import gtk.RangeAccessible; public import gtk.RcProperty; public import gtk.RcStyle; public import gtk.RecentAction; public import gtk.RecentChooserDialog; public import gtk.RecentChooserIF; public import gtk.RecentChooserMenu; public import gtk.RecentChooserT; public import gtk.RecentChooserWidget; public import gtk.RecentFilter; public import gtk.RecentInfo; public import gtk.RecentManager; public import gtk.RendererCellAccessible; public import gtk.Requisition; public import gtk.Revealer; public import gtk.Scale; public import gtk.ScaleAccessible; public import gtk.ScaleButton; public import gtk.ScaleButtonAccessible; public import gtk.ScrollableIF; public import gtk.ScrollableT; public import gtk.Scrollbar; public import gtk.ScrolledWindow; public import gtk.ScrolledWindowAccessible; public import gtk.SearchBar; public import gtk.SearchEntry; public import gtk.SelectionData; public import gtk.Separator; public import gtk.SeparatorMenuItem; public import gtk.SeparatorToolItem; public import gtk.Settings; public import gtk.ShortcutLabel; public import gtk.ShortcutsGroup; public import gtk.ShortcutsSection; public import gtk.ShortcutsShortcut; public import gtk.ShortcutsWindow; public import gtk.SizeGroup; public import gtk.Socket; public import gtk.SpinButton; public import gtk.SpinButtonAccessible; public import gtk.Spinner; public import gtk.SpinnerAccessible; public import gtk.Stack; public import gtk.StackAccessible; public import gtk.StackSidebar; public import gtk.StackSwitcher; public import gtk.Statusbar; public import gtk.StatusbarAccessible; public import gtk.StatusIcon; public import gtk.StockItem; public import gtk.Style; public import gtk.StyleContext; public import gtk.StyleProperties; public import gtk.StyleProviderIF; public import gtk.StyleProviderT; public import gtk.Switch; public import gtk.SwitchAccessible; public import gtk.SymbolicColor; public import gtk.Table; public import gtk.TargetEntry; public import gtk.TargetList; public import gtk.TearoffMenuItem; public import gtk.Testing; public import gtk.TextAttributes; public import gtk.TextBuffer; public import gtk.TextCellAccessible; public import gtk.TextChildAnchor; public import gtk.TextIter; public import gtk.TextMark; public import gtk.TextTag; public import gtk.TextTagTable; public import gtk.TextView; public import gtk.TextViewAccessible; public import gtk.ThemingEngine; public import gtk.ToggleAction; public import gtk.ToggleButton; public import gtk.ToggleButtonAccessible; public import gtk.ToggleToolButton; public import gtk.Toolbar; public import gtk.ToolButton; public import gtk.ToolItem; public import gtk.ToolItemGroup; public import gtk.ToolPalette; public import gtk.ToolShellIF; public import gtk.ToolShellT; public import gtk.Tooltip; public import gtk.ToplevelAccessible; public import gtk.TreeDragDestIF; public import gtk.TreeDragDestT; public import gtk.TreeDragSourceIF; public import gtk.TreeDragSourceT; public import gtk.TreeIter; public import gtk.TreeIterError; public import gtk.TreeModel; public import gtk.TreeModelFilter; public import gtk.TreeModelIF; public import gtk.TreeModelSort; public import gtk.TreeModelT; public import gtk.TreeNode; public import gtk.TreePath; public import gtk.TreeRowReference; public import gtk.TreeSelection; public import gtk.TreeSortableIF; public import gtk.TreeSortableT; public import gtk.TreeStore; public import gtk.TreeView; public import gtk.TreeViewAccessible; public import gtk.TreeViewColumn; public import gtk.UIManager; public import gtk.VBox; public import gtk.VButtonBox; public import gtk.Version; public import gtk.Viewport; public import gtk.VolumeButton; public import gtk.VPaned; public import gtk.VScale; public import gtk.VScrollbar; public import gtk.VSeparator; public import gtk.Widget; public import gtk.WidgetAccessible; public import gtk.WidgetClass; public import gtk.WidgetPath; public import gtk.Window; public import gtk.WindowAccessible; public import gtk.WindowGroup;
Jul 05 2017
Unfortunately, importing that module seems to throw an error for some insane reason. Error 42: Symbol Undefined _D3gtk6All12__ModuleInfoZ (gtk.AllGTK.__ModuleInfo) without importing it in to the project(but directly importing all the other modules works fine, e.g., copying and pasting).
Jul 05 2017
Am Thu, 06 Jul 2017 03:49:04 +0000 schrieb FoxyBrown <Foxy Brown.IPT>:Unfortunately, importing that module seems to throw an error for some insane reason. Error 42: Symbol Undefined _D3gtk6All12__ModuleInfoZ (gtk.AllGTK.__ModuleInfo) without importing it in to the project(but directly importing all the other modules works fine, e.g., copying and pasting).Sounds like there is no compiled version of gtk.All in the GtkD lib. You could compile it together with your application as a workaround. -- Marco
Jul 06 2017