gtkd-developers / GtkD

GtkD is a D binding and OO wrapper of GTK+ originally created by Antonio Monteiro
http://gtkd.org
Other
321 stars 72 forks source link

How to compile gtkd apps? #296

Open loongkylin opened 4 years ago

loongkylin commented 4 years ago

I work on debian, dmd. How to compile gtkd apps? which command line should I use?

MikeWey commented 4 years ago

if you have installed the libgtkd-3-dev package from the repositories you could compile your application like this:

ldc2 YourApp.d `pkg-config --cflags gtkd-3`

You would however need to use ldc since that is what is used to compile the library in the repository.

To do the same with dmd you would need to compile and install gtkd yourself using make & make install

An other option is to use dub (https://code.dlang.org), to do that you would need to write an dub.json file for your application that lists gtk-d:gtkd as a dependency. You could then use dub build to compile your application (and gtkd when needed).

VadimkaG commented 1 month ago

I also had questions about building my application. However, my question is about Windows. I compile using dub. Everything works great on Linux. Is it possible to compile the program into one file on Windows? I will also be happy with the option if there is one dll file. At the moment I have to put a lot of dll files next to the exe in order for the application to run. Although even under these conditions I may get some errors. For example, gtk completely refused to accept the .png