Thread overview
Visual Studio with gtkD
Dec 21, 2020
RedshiftVelocities
Dec 21, 2020
frame
Dec 21, 2020
RedshiftVelocities
December 21, 2020
I'm trying to compile a gtkD program with VisualD. I've been following this guide (https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows) and I can compile just fine directly from the command line. However, in VS, I get numerous errors in the form of "Error: module `Main` is in file 'gtk\Main.d' which cannot be read". I can compile non-gtk D programs just fine in VS. Any advice? Thanks!
December 21, 2020
On Monday, 21 December 2020 at 17:34:45 UTC, RedshiftVelocities wrote:
> I'm trying to compile a gtkD program with VisualD. I've been following this guide (https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows) and I can compile just fine directly from the command line. However, in VS, I get numerous errors in the form of "Error: module `Main` is in file 'gtk\Main.d' which cannot be read". I can compile non-gtk D programs just fine in VS. Any advice? Thanks!

You need to add source files and gtkd.lib to your project settings:

In your project properties select your [DMD/LDC-compiler > General] and add your generated\gtkd path to "Import Paths".

In [Linker -> Input -> Additional Dependencies] just add gtkd.lib to the rest.

These are my settings:

Import Paths => E:\Sources\GtkD\generated\gtkd;%(ImportPaths)
Additional Dependencies => gtkd.lib;%(AdditionalDependencies)

That's it.
December 21, 2020
That appears to have worked. Thanks!