View previous topic :: View next topic |
Author |
Message |
samsam698
Joined: 10 Jan 2008 Posts: 63
|
Posted: Fri May 21, 2010 12:56 am Post subject: How to compile my gtkd program under Ubuntu |
|
|
Greetings to everybody!
I know this is a very silly qestion.If I was missing something in the gtkd page and gtkd forum,or D main page,forgive me.
I can compile and run a plain D(phobos2) app under Ubuntu,but I can't compile a gtkD app it seems that the gtkD lib is missing.Where /What are them?What's the command line look like?
Thanks a lot for your help in advance.
Regard,
Sam |
|
Back to top |
|
|
Epileg
Joined: 10 Sep 2009 Posts: 77
|
Posted: Fri May 21, 2010 10:10 am Post subject: |
|
|
You can try these Ubuntu deb packages with the latest GtkD and dmd2 release.
Best regards. |
|
Back to top |
|
|
samsam698
Joined: 10 Jan 2008 Posts: 63
|
Posted: Fri May 21, 2010 10:19 am Post subject: |
|
|
Epileg wrote: | You can try these Ubuntu deb packages with the latest GtkD and dmd2 release.
Best regards. |
Sorry I did not make it clear.
What I want is not to compile gtkd ,rather I mean I have got the gtkD package in my pc,now how can compile my own d program written in gtkD.
Thanks a lot.
Regards,
Sam |
|
Back to top |
|
|
Epileg
Joined: 10 Sep 2009 Posts: 77
|
Posted: Fri May 21, 2010 10:34 am Post subject: |
|
|
Ok, on a plain text editor, as "gedit" (I prefer "geany") paste this code:
Code: | import std.stdio;
import gtk.MainWindow;
import gtk.Label;
import gtk.Main;
void main(string[] args)
{
Main.init(args);
MainWindow win = new MainWindow("Hello world!");
win.setDefaultSize(220, 60) ;
win.add(new Label("My fist GtkD program!"));
win.showAll();
Main.run();
} |
save it as "hello.d", open a terminal, go to the directory you've saved the file and type:
Quote: | $ dmd hello.d -ofhello
$ ./hello |
That's all!
Best regards.
Last edited by Epileg on Sat May 22, 2010 4:17 am; edited 1 time in total |
|
Back to top |
|
|
samsam698
Joined: 10 Jan 2008 Posts: 63
|
Posted: Sat May 22, 2010 12:12 am Post subject: |
|
|
Epileg wrote: | Ok, on a plain text editor, as "gedit" (I prefer "geany") paste this code:
Code: | import std.stdio;
import gtk.MainWindow;
import gtk.Label;
import gtk.Main;
void main(string[] args)
{
Main.init(args);
MainWindow win = new MainWindow("Hello world!");
win.setDefaultSize(220, 60) ;
win.add(new Label("My fist GtkD program!"));
win.showAll();
Main.run();
} |
save it as "hello.d", open a terminal, got to the directory you've saved the file and type:
Quote: | $ dmd hello.d -ofhello
$ ./hello |
That's all!
Best regards. |
Thank you so much!Got it that in the terminal there is no need to add gtk libs and/or gtkd libs,just the same as ordinary d apps.But when under CodeBlocks,it complains that a lot of stuffs were missing,mainly related to gtkd,so I guess it actually complains no gtk(d) libs found.
Now my question is that,where are gtk libs and gtkD libs stored in the Ubuntu system.How do I need to configure the C::B to compile D programs written with gtkD lib.
Really appreciate for all your help! |
|
Back to top |
|
|
Epileg
Joined: 10 Sep 2009 Posts: 77
|
Posted: Sat May 22, 2010 4:13 am Post subject: |
|
|
Well, I've no idea about C::B. I just use geany for my smalls programs. If You find the correct way to setup C::B, please tell it here.
The GtkD libraries:
/usr/lib/libgtkdgda.a
/usr/lib/libgtkd.a
/usr/lib/libgtkdgl.a
/usr/lib/libgstreamerd.a
/usr/lib/libgtkdsv.a
the headers are in:
and the Gtk+ libs are in:
Best regards. |
|
Back to top |
|
|
|